# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=roundcubemail pkgver=0.8.4 pkgrel=0 pkgdesc="A PHP web-based mail client" url="http://www.roundcube.net" arch="noarch" license="GPL3+" install="$pkgname.post-upgrade" depends="php php-imap php-xml php-json php-dom php-exif" makedepends="" subpackages="$pkgname-installer $pkgname-doc" source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz fix-dirs.patch" _src="$srcdir"/roundcubemail-$pkgver prepare() { cd "$_src" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # fix permissions find . -type f -print | xargs chmod a-x # remove .htaccess find . -name \.htaccess -print | xargs rm -f # fixup paths to use the right paths sed -i -e 's|temp/|/tmp/|' \ -e 's|config/|/etc/roundcube/|' \ -e 's|logs/|/var/log/roundcube/|' \ config/main.inc.php.dist || return 1 # cleanup sed -i 's/\r//' SQL/mssql.initial.sql rm -rf logs temp } build() { return 0 } package() { _instdir="$pkgdir"/usr/share/webapps/roundcube mkdir -p "${_instdir}" cd "${_instdir}" cp -rp "$srcdir"/roundcubemail-$pkgver/* . # install config in /etc/roundcube so config files are not overwritten # on upgrades mkdir -p "$pkgdir"/etc/ mv config "$pkgdir"/etc/roundcube install -d "$pkgdir"/var/log/roundcube mkdir -p "$pkgdir"/usr/share/doc/roundcube mkdir -p "$pkgdir"/usr/share/licenses/roundcube for file in CHANGELOG INSTALL README.md UPGRADING do mv "$pkgdir"/usr/share/webapps/roundcube/$file \ "$pkgdir"/usr/share/doc/roundcube || exit 1 done mv "$pkgdir"/usr/share/webapps/roundcube/LICENSE \ "$pkgdir"/usr/share/licenses/roundcube || exit 1 } installer() { pkgdesc="Roundcubemail installer script" mkdir -p "$subpkgdir"/usr/share/webapps/roundcube mv "$pkgdir"/usr/share/webapps/roundcube/installer \ "$subpkgdir"/usr/share/webapps/roundcube } md5sums="2f578c8c4741bfc43d9188923c06b638 roundcubemail-0.8.4.tar.gz 987406fd8f12719544aeb057973b368e fix-dirs.patch"