mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
main/uwsgi: add more plugins and support for Python 3
This commit is contained in:
parent
8406deb205
commit
214ffc834a
@ -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,10 +144,23 @@ 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() {
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user