aboutsummaryrefslogtreecommitdiffstats
path: root/main/uwsgi/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-07-16 18:22:31 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-07-18 11:11:59 +0000
commit214ffc834a375d01db8d5cdb57521b2ca8c7901f (patch)
tree8c1c4668ef956cb8a3321f45feacdbaa1293953e /main/uwsgi/APKBUILD
parent8406deb2054f207ddd5455d0de4130c383f2c963 (diff)
downloadaports-214ffc834a375d01db8d5cdb57521b2ca8c7901f.tar.bz2
aports-214ffc834a375d01db8d5cdb57521b2ca8c7901f.tar.xz
main/uwsgi: add more plugins and support for Python 3
Diffstat (limited to 'main/uwsgi/APKBUILD')
-rw-r--r--main/uwsgi/APKBUILD141
1 files changed, 128 insertions, 13 deletions
diff --git a/main/uwsgi/APKBUILD b/main/uwsgi/APKBUILD
index c039bc7073..9b12b05691 100644
--- a/main/uwsgi/APKBUILD
+++ b/main/uwsgi/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uwsgi
pkgver=2.0.13.1
-pkgrel=3
+pkgrel=4
pkgdesc="uWSGI application container server"
url="http://projects.unbit.it/uwsgi/"
arch="all"
@@ -13,8 +13,25 @@ depends="mailcap"
install="uwsgi.pre-install"
pkgusers="uwsgi"
pkggroups="uwsgi"
-makedepends="linux-headers lua5.2-dev python python-dev zeromq-dev paxmark
- pcre-dev libcap-dev"
+makedepends="
+ attr-dev
+ curl-dev
+ geoip-dev
+ libcap-dev
+ linux-headers
+ linux-pam-dev
+ libxml2-dev
+ libxslt-dev
+ lua5.2-dev
+ paxmark
+ pcre-dev
+ postgresql-dev
+ python
+ python-dev
+ python3-dev
+ zeromq-dev
+ zlib-dev
+ "
source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
uwsgi.initd
uwsgi.ini
@@ -24,12 +41,96 @@ source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
"
builddir="$srcdir/$pkgname-$pkgver"
+# Plugins for Python 2 or without compile dependency on Python.
+# You may specify a custom name for so lib and subpackage after a colon.
+_plugins="
+ alarm_curl
+ cache
+ carbon
+ cgi
+ cheaper_backlog2
+ cheaper_busyness
+ corerouter
+ curl_cron
+ dumbloop
+ dummy
+ echo
+ emperor_amqp
+ emperor_pg
+ emperor_zeromq
+ fastrouter
+ forkptyrouter
+ geoip
+ gevent
+ graylog2
+ http
+ legion_cache_fetch
+ logcrypto
+ logfile
+ logpipe
+ logsocket
+ logzmq
+ lua
+ msgpack
+ nagios
+ notfound
+ pam
+ ping
+ pty
+ python
+ rawrouter
+ redislog
+ router_basicauth
+ router_cache
+ router_expires
+ router_hash
+ router_http
+ router_memcached
+ router_metrics
+ router_radius
+ router_redirect
+ router_redis
+ router_rewrite
+ router_static
+ router_uwsgi
+ rpc
+ rrdtool
+ rsyslog
+ signal
+ spooler
+ sslrouter
+ stats_pusher_file
+ stats_pusher_socket
+ stats_pusher_statsd
+ symcall
+ syslog
+ transformation_chunked
+ transformation_gzip
+ transformation_offload
+ transformation_template
+ transformation_tofile
+ tuntap
+ ugreen
+ webdav
+ xslt
+ zabbix
+ zergpool
+ "
+# Plugins for Python 3.
+# You may specify a custom name for so lib and subpackage after a colon.
+_plugins3="gevent:gevent3 python:python3"
+
subpackages=""
-_plugins="cgi lua python router_uwsgi"
-for _p in $_plugins; do
- subpackages="$subpackages uwsgi-$_p:_plugin"
+for _p in $_plugins $_plugins3; do
+ subpackages="$subpackages uwsgi-${_p#*:}:_plugin"
done
+_desc_gevent="uWSGI plugin for gevent (Python 2)"
+_desc_gevent3="uWSGI plugin for gevent (Python 3)"
+_desc_python="uWSGI plugin for Python 2"
+_desc_python3="uWSGI plugin for Python 3"
+
+
prepare() {
default_prepare || return 1
cp "$srcdir"/alpine.buildconf buildconf/alpine.ini
@@ -43,12 +144,25 @@ build() {
CC="gcc" python uwsgiconfig.py --build alpine || return 1
export UWSGICONFIG_LUAPC="lua5.2"
- local plugin; for plugin in $_plugins; do
- msg "Building $plugin plugin"
- python uwsgiconfig.py --plugin plugins/$plugin alpine || return 1
+
+ local item
+ for item in $_plugins; do
+ _build python "$item" || return 1
+ done
+ for item in $_plugins3; do
+ _build python3 "$item" || return 1
done
}
+_build() {
+ local python="$1"
+ local plugin="${2%:*}"
+ local myname="${2#*:}"
+
+ msg "Building $plugin plugin ($myname)"
+ $python uwsgiconfig.py --plugin plugins/$plugin alpine $myname
+}
+
package() {
cd "$builddir"
@@ -66,13 +180,14 @@ package() {
}
_plugin() {
- local plugin="${subpkgname#$pkgname-}"
- pkgdesc="$plugin plugin for uWSGI"
+ local name="${subpkgname#$pkgname-}"
+ local desc="$(eval "echo \$_desc_$name")"
+ pkgdesc="${desc:-"uWSGI plugin $name"}"
depends="uwsgi"
cd "$builddir"
- install -D ${plugin}_plugin.so \
- "$subpkgdir"/usr/lib/uwsgi/${plugin}_plugin.so || return 1
+ install -D ${name}_plugin.so \
+ "$subpkgdir"/usr/lib/uwsgi/${name}_plugin.so || return 1
}
md5sums="e9ec5b2b296ce21b3787e0579d02bade uwsgi-2.0.13.1.tar.gz