aboutsummaryrefslogtreecommitdiffstats
path: root/community/roundcubemail/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-26 16:08:20 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-27 15:30:36 +0200
commit76ca1d47db7d50f8fa61acb4e123352a6d94c7e7 (patch)
tree6025bc17c42a36584fc5acb1d4c6ac96eee72565 /community/roundcubemail/APKBUILD
parent57f023dd5061dcfb5945550c3a629da6d6e29ed7 (diff)
downloadaports-76ca1d47db7d50f8fa61acb4e123352a6d94c7e7.tar.bz2
aports-76ca1d47db7d50f8fa61acb4e123352a6d94c7e7.tar.xz
community/roundcubemail: improve abuild
Diffstat (limited to 'community/roundcubemail/APKBUILD')
-rw-r--r--community/roundcubemail/APKBUILD80
1 files changed, 46 insertions, 34 deletions
diff --git a/community/roundcubemail/APKBUILD b/community/roundcubemail/APKBUILD
index 127f2799da..43f9d38487 100644
--- a/community/roundcubemail/APKBUILD
+++ b/community/roundcubemail/APKBUILD
@@ -1,6 +1,5 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-_php=php7
pkgname=roundcubemail
pkgver=1.3.6
pkgrel=0
@@ -8,17 +7,30 @@ 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
+_php=php7
+depends="$_php
+ $_php-dom
+ $_php-exif
+ $_php-iconv
+ $_php-imap
+ $_php-intl
+ $_php-json
+ $_php-mbstring
+ $_php-openssl
+ $_php-pear-auth_sasl
+ $_php-pear-mail_mime
+ $_php-pear-net_idna2
+ $_php-pear-net_smtp
+ $_php-session
+ $_php-xml
"
-options="!check"
+options="!check" # no tests provided
+install="$pkgname.post-upgrade"
subpackages="$pkgname-installer $pkgname-doc"
-source="https://github.com/roundcube/$pkgname/releases/download/$pkgver/${pkgname}-$pkgver.tar.gz
- fix-dirs.patch"
-builddir="$srcdir"/roundcubemail-$pkgver
+source="https://github.com/roundcube/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
+ fix-dirs.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
# 1.3.6-r0:
@@ -28,6 +40,8 @@ builddir="$srcdir"/roundcubemail-$pkgver
# 1.2.5-r0:
# - CVE-2017-8114
+_destdir="usr/share/webapps/roundcube"
+
prepare() {
cd "$builddir"
default_prepare
@@ -48,37 +62,35 @@ prepare() {
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
+ mkdir -p "$pkgdir/$_destdir"
+ cd "$pkgdir"
+
+ cp -rp "$builddir"/* ./$_destdir/
- 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
+ # Install config in /etc/roundcube so config files are not overwritten
+ # on upgrades.
+ mkdir -p ./etc/
+ mv ./$_destdir/config ./etc/roundcube
+
+ local file; for file in CHANGELOG INSTALL README.md UPGRADING; do
+ _mv ./$_destdir/$file ./usr/share/doc/roundcube/
done
- mv "$pkgdir"/usr/share/webapps/roundcube/LICENSE \
- "$pkgdir"/usr/share/licenses/roundcube
+ _mv ./$_destdir/LICENSE ./usr/share/licenses/roundcube/
+
+ install -d ./var/log/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
+
+ _mv "$pkgdir"/$_destdir/installer "$subpkgdir"/$_destdir/
+}
+
+_mv() {
+ local dest; for dest; do true; done # get last argument
+ mkdir -p "$dest"
+ mv $@
}
sha512sums="c5e1e80034392ea4fcf780750ad2b7db43422a746462015865cbdb027e9e47b2bae7b191da19b65a7b9303c195bdfd0aa5b5a0382c09dd97d117671271cdc122 roundcubemail-1.3.6.tar.gz