aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-26 23:22:23 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-27 15:30:37 +0200
commit2e608a2da1cefbd866be11721be3da4d0a863efb (patch)
tree27db52d2387aee655061d0c2d0923f06226dc2cd /community
parentd825a8394c494b9768c60df29658ca82db674327 (diff)
downloadaports-2e608a2da1cefbd866be11721be3da4d0a863efb.tar.bz2
aports-2e608a2da1cefbd866be11721be3da4d0a863efb.tar.xz
community/roundcubemail: move plugins with extra deps to subpkgs
And fix their dependencies.
Diffstat (limited to 'community')
-rw-r--r--community/roundcubemail/APKBUILD24
-rw-r--r--community/roundcubemail/roundcubemail.post-install14
2 files changed, 36 insertions, 2 deletions
diff --git a/community/roundcubemail/APKBUILD b/community/roundcubemail/APKBUILD
index 4c3a6e9997..17d8e4799d 100644
--- a/community/roundcubemail/APKBUILD
+++ b/community/roundcubemail/APKBUILD
@@ -26,9 +26,12 @@ depends="$_php
$_php-session
$_php-sockets
$_php-xml
- $_php-zip
ca-certificates
"
+_depends_managesieve="$_php-pear-net_sieve"
+_depends_zipdownload="$_php-zip"
+# Install plugins' deps during build just to verify that they exist.
+makedepends="$_depends_managesieve"
pkgusers="roundcube"
pkggroups="$pkgusers"
options="!check" # no tests provided
@@ -57,6 +60,15 @@ for _db in mssql mysql pgsql sqlite; do
subpackages="$subpackages $pkgname-$_db:_db"
done
+# List of plugins to move into subpackages.
+_plugins="
+ managesieve
+ zipdownload
+ "
+for _plugin in $_plugins; do
+ subpackages="$subpackages $pkgname-$_plugin:_plugin"
+done
+
_destdir="usr/share/webapps/roundcube"
prepare() {
@@ -166,6 +178,16 @@ _db() {
_mv "$pkgdir"/$_destdir/SQL/$rcname* "$subpkgdir"/$_destdir/SQL/
}
+_plugin() {
+ local name="${subpkgname#$pkgname-}"
+ pkgdesc="$pkgdesc ($name plugin)"
+ depends="$pkgname=$pkgver-r$pkgrel $(eval "echo \$_depends_$name")"
+
+ cd "$pkgdir"
+ _mv ./$_destdir/plugins/$name "$subpkgdir"/$_destdir/plugins/
+ _mv ./etc/roundcube/plugins/$name.inc.php "$subpkgdir"/etc/roundcube/plugins/
+}
+
_mv() {
local dest; for dest; do true; done # get last argument
mkdir -p "$dest"
diff --git a/community/roundcubemail/roundcubemail.post-install b/community/roundcubemail/roundcubemail.post-install
index f899f7e02d..1774e77a1a 100644
--- a/community/roundcubemail/roundcubemail.post-install
+++ b/community/roundcubemail/roundcubemail.post-install
@@ -16,12 +16,24 @@ if ! [ -e "$keyfile" ]; then
fi
if [ "${0##*.}" = 'post-upgrade' ]; then
+ ver_new="$1"
+ ver_old="$2"
+
cat >&2 <<-EOF
*
* Please read /usr/share/doc/roundcube/UPGRADE
* in roundcubemail-doc package for schema or config update
*
EOF
-fi
+ if [ "$(apk version -t "$ver_old" '1.3.6-r1')" = '<' ]; then
+ cat >&2 <<-EOF
+ *
+ * Roundcube plugins managesieve and zipdownload has been moved into
+ * subpackages. If you use them, install roundcubemail-<plugin> using apk
+ * (e.g. apk add roundcubemail-zipdownload).
+ *
+ EOF
+ fi
+fi
exit 0