aboutsummaryrefslogtreecommitdiffstats
path: root/main/uwsgi
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-07-16 13:34:11 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-07-18 11:11:59 +0000
commit8406deb2054f207ddd5455d0de4130c383f2c963 (patch)
tree0083439b7abf74fd164f3f5c5a6ce180e1c7e0e7 /main/uwsgi
parentd832101c5fc01db7d88d6fe53ca8de8f1b012fb3 (diff)
downloadaports-8406deb2054f207ddd5455d0de4130c383f2c963.tar.bz2
aports-8406deb2054f207ddd5455d0de4130c383f2c963.tar.xz
main/uwsgi: improve abuild
Diffstat (limited to 'main/uwsgi')
-rw-r--r--main/uwsgi/APKBUILD51
1 files changed, 25 insertions, 26 deletions
diff --git a/main/uwsgi/APKBUILD b/main/uwsgi/APKBUILD
index a9447ef144..c039bc7073 100644
--- a/main/uwsgi/APKBUILD
+++ b/main/uwsgi/APKBUILD
@@ -6,10 +6,10 @@ pkgname=uwsgi
pkgver=2.0.13.1
pkgrel=3
pkgdesc="uWSGI application container server"
-url=http://projects.unbit.it/uwsgi/
-arch=all
-license=GPL2
-depends=mailcap
+url="http://projects.unbit.it/uwsgi/"
+arch="all"
+license="GPL2"
+depends="mailcap"
install="uwsgi.pre-install"
pkgusers="uwsgi"
pkggroups="uwsgi"
@@ -20,38 +20,38 @@ source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
uwsgi.ini
readme.emperor
alpine.buildconf
-
musl-fix-python.patch
"
-subpackages=""
-
-builddir=$srcdir/$pkgname-$pkgver
+builddir="$srcdir/$pkgname-$pkgver"
-_plugins="lua python router_uwsgi cgi"
-for _p in ${_plugins}; do
- subpackages="$subpackages uwsgi-$_p:_$_p"
+subpackages=""
+_plugins="cgi lua python router_uwsgi"
+for _p in $_plugins; do
+ subpackages="$subpackages uwsgi-$_p:_plugin"
done
prepare() {
- default_prepare
- cp "$srcdir"/alpine.buildconf buildconf/alpine.ini || return 1
+ default_prepare || return 1
+ cp "$srcdir"/alpine.buildconf buildconf/alpine.ini
}
build() {
cd "$builddir"
- msg "building core"
+
+ msg "Building core"
# ccache seems to trigger some weird bug on musl
CC="gcc" python uwsgiconfig.py --build alpine || return 1
export UWSGICONFIG_LUAPC="lua5.2"
- for i in ${_plugins}; do
- msg "building $i plugin"
- python uwsgiconfig.py --plugin plugins/$i alpine || return 1
+ local plugin; for plugin in $_plugins; do
+ msg "Building $plugin plugin"
+ python uwsgiconfig.py --plugin plugins/$plugin alpine || return 1
done
}
package() {
cd "$builddir"
+
install -D uwsgi \
"$pkgdir"/usr/sbin/uwsgi || return 1
install -D "$srcdir"/readme.emperor \
@@ -60,22 +60,21 @@ package() {
"$pkgdir"/etc/uwsgi/uwsgi.ini return 1
install -Dm755 "$srcdir"/uwsgi.initd \
"$pkgdir"/etc/init.d/uwsgi || return 1
- # disable emutramp/mprotect, this is needed for luajit and cffi
+
+ # Disable emutramp/mprotect, this is needed for luajit and cffi.
paxmark -em "$pkgdir"/usr/sbin/uwsgi
}
_plugin() {
+ local plugin="${subpkgname#$pkgname-}"
+ pkgdesc="$plugin plugin for uWSGI"
+ depends="uwsgi"
+
cd "$builddir"
- depends=uwsgi
- pkgdesc="$1 plugin for uwsgi"
- install -D "$1_plugin".so \
- "$subpkgdir"/usr/lib/uwsgi/"$1_plugin".so || return 1
+ install -D ${plugin}_plugin.so \
+ "$subpkgdir"/usr/lib/uwsgi/${plugin}_plugin.so || return 1
}
-for _p in $_plugins; do
- eval "_$_p() { _plugin $_p; }"
-done
-
md5sums="e9ec5b2b296ce21b3787e0579d02bade uwsgi-2.0.13.1.tar.gz
808aa42f536b7d4dd9dd966b1f25d690 uwsgi.initd
a797ffed638ea797a16557d963598fb2 uwsgi.ini