aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-12-04 10:39:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-12-04 10:39:09 +0000
commitd8419308265d55b29648b98e7b867c6b53e5d749 (patch)
tree813e96089b866fb19a5362a9b84ac065f7c5a64f
parent619168b33cf7d4a1ea329b9adbcb7eb91d831a71 (diff)
downloadaports-d8419308265d55b29648b98e7b867c6b53e5d749.tar.bz2
aports-d8419308265d55b29648b98e7b867c6b53e5d749.tar.xz
testing/uwsgi: add router_uwsgi plugin
-rw-r--r--testing/uwsgi/APKBUILD33
1 files changed, 17 insertions, 16 deletions
diff --git a/testing/uwsgi/APKBUILD b/testing/uwsgi/APKBUILD
index 1f6707f611..b9a96fbb6f 100644
--- a/testing/uwsgi/APKBUILD
+++ b/testing/uwsgi/APKBUILD
@@ -2,17 +2,22 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uwsgi
pkgver=1.9.20
-pkgrel=0
+pkgrel=1
pkgdesc="uWSGI application container server"
url=http://projects.unbit.it/uwsgi/
arch=all
license=GPL-2
makedepends="linux-headers lua5.2-dev python python-dev zeromq-dev paxctl"
-subpackages="uwsgi-lua uwsgi-python:py"
source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
uwsgi.initd uwsgi.confd
"
+_plugins="lua python router_uwsgi"
+subpackages=""
+for _p in $_plugins ; do
+ subpackages="$subpackages uwsgi-$_p:_$_p"
+done
+
_builddir=$srcdir/$pkgname-$pkgver
prepare() {
local i
@@ -31,12 +36,11 @@ build() {
msg "building core"
python uwsgiconfig.py --build core || return 1
- msg "building lua plugin"
- UWSGICONFIG_LUAPC="lua5.2" \
- python uwsgiconfig.py --plugin plugins/lua core || return 1
-
- msg "building python plugin"
- python uwsgiconfig.py --plugin plugins/python core || return 1
+ export UWSGICONFIG_LUAPC="lua5.2"
+ for i in $_plugins; do
+ msg "building $i plugin"
+ python uwsgiconfig.py --plugin plugins/$i core || return 1
+ done
}
package() {
@@ -59,18 +63,15 @@ package() {
paxctl -czxm "$bindir"/uwsgi
}
-lua() {
+_plugin() {
depends=uwsgi
mkdir -p "$subpkgdir"/usr/lib/uwsgi
- mv "$pkgdir/usr/lib/uwsgi/lua_plugin.so" "$subpkgdir/usr/lib/uwsgi"
+ mv "$pkgdir/usr/lib/uwsgi/$1_plugin.so" "$subpkgdir/usr/lib/uwsgi" || return 1
}
-py() {
- depends=uwsgi
-
- mkdir -p "$subpkgdir"/usr/lib/uwsgi
- mv "$pkgdir/usr/lib/uwsgi/python_plugin.so" "$subpkgdir/usr/lib/uwsgi"
-}
+for _p in $_plugins; do
+ eval "_$_p() { _plugin $_p; }"
+done
md5sums="7ba1ef65e0678b6507e52dcabd158a61 uwsgi-1.9.20.tar.gz
8a8be061d7b5f3108a0f16813da68389 uwsgi.initd