From c819bb5c7ae34774411ef3615d025cacd2f760a3 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 11 May 2017 20:33:30 +0200 Subject: main/uwsgi: fix depends for plugins with requirements --- main/uwsgi/APKBUILD | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'main/uwsgi/APKBUILD') diff --git a/main/uwsgi/APKBUILD b/main/uwsgi/APKBUILD index 8f111aaad6..f12deab7c0 100644 --- a/main/uwsgi/APKBUILD +++ b/main/uwsgi/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Natanael Copa pkgname=uwsgi pkgver=2.0.14 -pkgrel=8 +pkgrel=9 pkgdesc="uWSGI application container server" url="http://projects.unbit.it/uwsgi/" arch="all" @@ -189,6 +189,19 @@ _plugin() { depends="uwsgi" cd "$builddir" + + local requires=$(sed '$a print(" ".join(REQUIRES))' \ + plugins/$name/uwsgiplugin.py 2>/dev/null | python3 2>/dev/null) + + local req; for req in $requires; do + if echo "$_plugins" | grep -qw "$req"; then + depends="$depends $pkgname-$req" + else + error "There's no subpackage for requirement $req!" + return 1 + fi + done + install -m 755 -D ${name}_plugin.so \ "$subpkgdir"/usr/lib/uwsgi/${name}_plugin.so || return 1 } -- cgit v1.2.3