# Contributor: Leonardo Arena # Maintainer: Natanael Copa _php=php7 pkgname=roundcubemail pkgver=1.3.8 pkgrel=0 pkgdesc="A PHP web-based mail client" url="http://www.roundcube.net" arch="noarch" license="GPL-3.0-or-later" 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 ${_php}-pear-auth_sasl ${_php}-openssl ${_php}-session ${_php}-mbstring ${_php}-iconv ${_php}-intl " options="!check" subpackages="$pkgname-installer $pkgname-doc" source="https://github.com/roundcube/$pkgname/releases/download/$pkgver/$pkgname-$pkgver-complete.tar.gz fix-dirs.patch" builddir="$srcdir"/roundcubemail-$pkgver # secfixes: # 1.3.8-r0: # - CVE-2018-19206 # 1.3.6-r0: # - CVE-2018-9846 # 1.2.7-r0: # - CVE-2017-16651 # 1.2.5-r0: # - CVE-2017-8114 prepare() { cd "$builddir" default_prepare # 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 # 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 "$builddir"/* . # 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 done mv "$pkgdir"/usr/share/webapps/roundcube/LICENSE \ "$pkgdir"/usr/share/licenses/roundcube } installer() { pkgdesc="Roundcubemail installer script" mkdir -p "$subpkgdir"/usr/share/webapps/roundcube mv "$pkgdir"/usr/share/webapps/roundcube/installer \ "$subpkgdir"/usr/share/webapps/roundcube } sha512sums="34dc9205cd93be6d6551086f4d22654dad7213b4b09000dc4def08357acdc634744ce1f560144a3d3b46e936258e90482e77fc4c691a55c205bcfdfe3745441e roundcubemail-1.3.8-complete.tar.gz a8dc9e9493f9b24441378f6a526eb26e4dd4b0ef0cafaf25dd55c334b92df88dcb06008f46404a80eae0520ac04431c5b2237fd662c85c31fc6ee2b0d8fa9435 fix-dirs.patch"