aboutsummaryrefslogtreecommitdiffstats
path: root/main/uwsgi/APKBUILD
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-06-13 12:13:06 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-06-13 15:56:29 +0200
commitdfb4b4cbc698aaa4e4f1798d46e3fda349a599a6 (patch)
treed6921615042860e9d1353ae644d5c368071dff74 /main/uwsgi/APKBUILD
parentcffed188deeaab6395053d91ca464ce1495b9569 (diff)
downloadaports-dfb4b4cbc698aaa4e4f1798d46e3fda349a599a6.tar.gz
aports-dfb4b4cbc698aaa4e4f1798d46e3fda349a599a6.tar.bz2
aports-dfb4b4cbc698aaa4e4f1798d46e3fda349a599a6.tar.xz
main/uwsgi: refactor init and cleanup
* remove extraneous patches * run uwsgi with its own user/group * add support for POSIX Capabilities (libcap) * simplify init with emperor mode * set base emperor config /etc/uwsgi/uwsgi.ini * set emperor dir to /etc/uwsgi/conf.d * put pid and socket into /run/uwsgi (created by init)
Diffstat (limited to 'main/uwsgi/APKBUILD')
-rw-r--r--main/uwsgi/APKBUILD73
1 files changed, 35 insertions, 38 deletions
diff --git a/main/uwsgi/APKBUILD b/main/uwsgi/APKBUILD
index 84c832f905..3742688da1 100644
--- a/main/uwsgi/APKBUILD
+++ b/main/uwsgi/APKBUILD
@@ -4,43 +4,41 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uwsgi
pkgver=2.0.13.1
-pkgrel=1
+pkgrel=2
pkgdesc="uWSGI application container server"
url=http://projects.unbit.it/uwsgi/
arch=all
license=GPL2
depends=mailcap
+install="uwsgi.pre-install"
+pkgusers="uwsgi"
+pkggroups="uwsgi"
makedepends="linux-headers lua5.2-dev python python-dev zeromq-dev paxmark
- pcre-dev"
+ pcre-dev libcap-dev"
source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
- uwsgi.initd uwsgi.confd
+ uwsgi.initd
+ uwsgi.ini
+ readme.emperor
alpine.buildconf
musl-fix-python.patch
"
+subpackages=""
+
+builddir=$srcdir/$pkgname-$pkgver
_plugins="lua python router_uwsgi cgi"
-subpackages=""
-for _p in $_plugins ; do
+for _p in ${_plugins}; do
subpackages="$subpackages uwsgi-$_p:_$_p"
done
-_builddir=$srcdir/$pkgname-$pkgver
prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-
+ default_prepare
cp "$srcdir"/alpine.buildconf buildconf/alpine.ini || return 1
}
build() {
- cd "$_builddir"
-
+ cd "$builddir"
msg "building core"
# ccache seems to trigger some weird bug on musl
CC="gcc" python uwsgiconfig.py --build alpine || return 1
@@ -53,29 +51,25 @@ build() {
}
package() {
- cd "$_builddir"
-
- local bindir=$pkgdir/usr/sbin
- install -d "$bindir"
- install uwsgi "$bindir"
-
- local libdir=$pkgdir/usr/lib/uwsgi
- install -d "$libdir"
- install *_plugin.so "$libdir"
-
+ cd "$builddir"
+ install -D uwsgi \
+ "$pkgdir"/usr/sbin/uwsgi || return 1
+ install -D "$srcdir"/readme.emperor \
+ "$pkgdir"/etc/uwsgi/conf.d || return 1
+ install -D "$srcdir"/uwsgi.ini \
+ "$pkgdir"/etc/uwsgi/uwsgi.ini return 1
install -Dm755 "$srcdir"/uwsgi.initd \
"$pkgdir"/etc/init.d/uwsgi || return 1
- install -Dm644 "$srcdir"/uwsgi.confd \
- "$pkgdir"/etc/conf.d/uwsgi || return 1
-
# disable emutramp/mprotect, this is needed for luajit and cffi
- paxmark -em "$bindir"/uwsgi
+ paxmark -em "$pkgdir"/usr/sbin/uwsgi
}
_plugin() {
+ cd "$builddir"
depends=uwsgi
- mkdir -p "$subpkgdir"/usr/lib/uwsgi
- mv "$pkgdir/usr/lib/uwsgi/$1_plugin.so" "$subpkgdir/usr/lib/uwsgi" || return 1
+ pkgdesc="$1 plugin for uwsgi"
+ install -D "$1_plugin".so \
+ "$subpkgdir"/usr/lib/uwsgi/"$1_plugin".so || return 1
}
for _p in $_plugins; do
@@ -83,17 +77,20 @@ for _p in $_plugins; do
done
md5sums="e9ec5b2b296ce21b3787e0579d02bade uwsgi-2.0.13.1.tar.gz
-6b285debf97aac42f6c1289f3625017e uwsgi.initd
-3d6afe6a8c52556d1d6c52384fc38d9a uwsgi.confd
+6226e676b95d9d0d7b4520443cb98479 uwsgi.initd
+67463bbb7807664d57d5ed89b5a490da uwsgi.ini
+b9b4b9a21a16e2ee686172b7d78ec2b0 readme.emperor
98407f45c566a2c39a34b882e1ac9fe4 alpine.buildconf
87c16f6fe482c9b0eac0d33c51873f45 musl-fix-python.patch"
sha256sums="2eca0c2f12ab76f032154cd147f4d5957d3195a022678d59cb507f4995a48d7f uwsgi-2.0.13.1.tar.gz
-9463bd286fa3cae72e65037766c3fe2847d10f95c7e920de16b2046b971c3799 uwsgi.initd
-4cb047e311aecd0f498da1d6a4c0947dd6dc7cc98575d54cb2ef150cacf8425c uwsgi.confd
+cd6bde9c8e41b09cdc1ad74b21dd119e7b56c999970399f49a035d08e27db768 uwsgi.initd
+19fafa3528ce96b1f683c4d02f991c823a6afc9953b65098cb70f5eea2c3b387 uwsgi.ini
+0162660ac33712784b1a5ff54db51c46ec8a4af873a813407c0eb9de571d1372 readme.emperor
31fc9c17f17aa067c3b025a3f7a84c6102d24368afcbc237f3d58041083c0875 alpine.buildconf
3838e8e3926a1f6271bb5aa88d309837a3bcd06cd570c499b72ca549326c682e musl-fix-python.patch"
sha512sums="f85ecc34cfa6c24476475996a16432f9ebd8563e4e9866392dbbf5beebec909b50634651d822bdad54bbae886c913c1502edbf04766bba94138330d46798046d uwsgi-2.0.13.1.tar.gz
-00a7e3ce888724716d1245eb7676062c5270098ea0429a12c82623db0806bb098872df7ebda38ad5ae796d8ac34d23f71d67af76ddce82f3669565ff034c1a2c uwsgi.initd
-9f00afb2aa574bbc59040f945475712b8c40da0c06eeb5699de5510aa116148e35ab0429fa891084cf0cd7868876d5a80e1601b7c85d0e2e9ea2a1f54cdde619 uwsgi.confd
+7325ac2b52539060516f2a0bf28da0c5c325d7c462343ba6496055b1c9d78c902e17bf071a374d9ab141e47e29f1b28a8c058b868a9aa9dfb673250c7bababba uwsgi.initd
+ac182ef6ce7526ccea701bcaef940863218c332239caaf6e35c22d44c70a4d6c51e29afeefd8f443335fce666195e1c9f9b51794e3a96d5f8567b49528f44f53 uwsgi.ini
+1867cd04599e6577f8f7d0b34241a51bbce6789db982bab509d64a7ccdbeab086bfd342c359cd6ba1d37ea8a217f42a56cecbecf646d12ad4cd258792c8eb61e readme.emperor
f3cff00926929a5bb40afafb65fd5228582af35fbf524562282020c4c4ae9c659231b2381f4b3cceb18e8f3f6c888c21bdd8ed4ddcd81e92fbc6a0891800ce38 alpine.buildconf
de68b16b44e554a79c073c9befa10566796316dbf4c375b4d6b633d80b0282694cca233f0a70f3d6570584324f14276826bbeb8f38b550c00087a05f9ba9227f musl-fix-python.patch"