archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / roundcubemail / repos / community-any / PKGBUILD
blob6144efe23ca074663c90338196e9c8e646093e98
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 pkgname=roundcubemail
4 pkgver=1.6.1
5 pkgrel=2
6 pkgdesc="A PHP web-based mail client"
7 arch=('any')
8 url="https://roundcube.net/"
9 license=('GPL')
10 depends=('php-interpreter')
11 options=('emptydirs')
12 makedepends=('git')
13 optdepends=('python: password change script'
14             'perl: for change_ldap_pass.pl helper'
15             'php-gd')
16 backup=('etc/webapps/roundcubemail/.htaccess'
17         'etc/webapps/roundcubemail/apache.conf')
18 install=roundcube.install
19 validpgpkeys=('F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5')
20 source=("https://github.com/roundcube/roundcubemail/releases/download/$pkgver/roundcubemail-$pkgver-complete.tar.gz"{,.asc}
21         "apache.conf")
22 sha512sums=('d5804e91c2da3b732cf14ad86f06099254540dd826ae5b7f14b98a7af8b90a7e9457221da2945aace8d12a60381eec85161e8bc6e0af4572b798a66cb36f2f00'
23             'SKIP'
24             '0e80317ae6f040386b0980d0764bc8a9aa5f7cbf028a210a896763cb7a7fea6d91600eda588922a0eb6d519f2ec1e0a2f723bd7ab554c8b1ad4af49a95101f6e')
26 prepare() {
27   cd "$srcdir"/roundcubemail-${pkgver}
28   sed -i \
29     -e "s|RCUBE_INSTALL_PATH . 'temp.*|'/var/cache/roundcubemail';|" \
30     -e "s|RCUBE_INSTALL_PATH . 'logs.*|'/var/log/roundcubemail';|" \
31     config/defaults.inc.php \
32     program/lib/Roundcube/rcube_config.php
35 package() {
36   mkdir -p "$pkgdir"/etc/webapps/roundcubemail
37   mkdir -p "$pkgdir"/usr/share/webapps
38   cd "$pkgdir"/usr/share/webapps
39   cp -ra "$srcdir"/roundcubemail-${pkgver} roundcubemail
40   cd roundcubemail
42   mv .htaccess "$pkgdir"/etc/webapps/roundcubemail/
43   ln -s /etc/webapps/roundcubemail/.htaccess .htaccess
45   mv config "$pkgdir"/etc/webapps/roundcubemail/
46   ln -s /etc/webapps/roundcubemail/config config
48   install -Dm0644 "$srcdir"/apache.conf "$pkgdir"/etc/webapps/roundcubemail/apache.conf
49   chown 33:33 "$pkgdir"/etc/webapps/roundcubemail/config/config.inc.php.sample
50   chmod 0640 "$pkgdir"/etc/webapps/roundcubemail/config/config.inc.php.sample
52   install -dm0750 -o 33 -g 33 "$pkgdir"/var/cache/roundcubemail
53   install -dm0750 -o 33 -g 33 "$pkgdir"/var/log/roundcubemail
55   rm -rf temp logs