# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=roundcubemail pkgver=1.1.5 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 php-pear-net_idna2 php-pear-mail_mime php-pear-net_smtp" makedepends="" subpackages="$pkgname-installer $pkgname-doc" source="https://github.com/roundcube/$pkgname/releases/download/$pkgver/${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/defaults.inc.php || 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 || return 1 done mv "$pkgdir"/usr/share/webapps/roundcube/LICENSE \ "$pkgdir"/usr/share/licenses/roundcube || return 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="4299d38de6098eb972e9d865b65f180d roundcubemail-1.1.5.tar.gz 0cfce0716e174c27c49e1c62aa30f67c fix-dirs.patch" sha256sums="ed50384c5ca0bcd9df08e1d0f2a46f2e7f468f583bcf410709f0a0659e00c453 roundcubemail-1.1.5.tar.gz 9185719a389b6cca64fc4aa73a5565858572651a71f66da0230ab180bf61e05a fix-dirs.patch" sha512sums="0202dfa5ae6bbc121bc07ccfe4fc5d5b3bc2ef84956c1ed1d5f0dac9290f945c0f09b6086484ff83eaec286b8083f0ce07c758ba76a13d0b1cb4571400140b1d roundcubemail-1.1.5.tar.gz 5c645ab7f130f8f3b17b7821e2cd0be88b6d7999da38876bde36c9b116bf7d34bcf52e2d8939d9359649e3fc5ddfb1cab7798ffb9e649be11bebd1d2c4ee006b fix-dirs.patch"