From 2e608a2da1cefbd866be11721be3da4d0a863efb Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 26 Jul 2018 23:22:23 +0200 Subject: community/roundcubemail: move plugins with extra deps to subpkgs And fix their dependencies. --- community/roundcubemail/APKBUILD | 24 +++++++++++++++++++++- community/roundcubemail/roundcubemail.post-install | 14 ++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) (limited to 'community') 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- using apk + * (e.g. apk add roundcubemail-zipdownload). + * + EOF + fi +fi exit 0 -- cgit v1.2.3