mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-14 08:34:46 +02:00
214 lines
5.1 KiB
Text
214 lines
5.1 KiB
Text
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
|
|
# Contributor: Kaarle Ritvanen <kunkku@alpinelinux.org>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
maintainer="Natanael Copa <ncopa@alpinelinux.org>"
|
|
pkgname=uwsgi
|
|
pkgver=2.0.29
|
|
pkgrel=0
|
|
pkgdesc="uWSGI application container server"
|
|
url="https://projects.unbit.it/uwsgi/"
|
|
arch="all"
|
|
license="GPL-2.0-only WITH GCC-exception-2.0"
|
|
depends="mailcap"
|
|
install="$pkgname.pre-install $pkgname.post-upgrade"
|
|
pkgusers="uwsgi"
|
|
pkggroups="uwsgi"
|
|
makedepends="
|
|
attr-dev
|
|
curl-dev
|
|
geoip-dev
|
|
jansson-dev
|
|
libcap-dev
|
|
libucontext-dev
|
|
linux-headers
|
|
linux-pam-dev
|
|
libpq-dev
|
|
libxml2-dev~2.13
|
|
libxslt-dev
|
|
lua5.3-dev
|
|
openssl-dev
|
|
pcre2-dev
|
|
python3-dev
|
|
zeromq-dev
|
|
zlib-dev
|
|
"
|
|
subpackages="$pkgname-openrc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/unbit/uwsgi/archive/refs/tags/$pkgver.tar.gz
|
|
uwsgi.initd
|
|
uwsgi.ini
|
|
readme.emperor
|
|
alpine.buildconf
|
|
musl-ucontext.patch
|
|
"
|
|
options="!check"
|
|
|
|
# secfixes:
|
|
# 2.0.16-r0:
|
|
# - CVE-2018-6758
|
|
|
|
# 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:gevent3
|
|
graylog2
|
|
http
|
|
legion_cache_fetch
|
|
logcrypto
|
|
logfile
|
|
logpipe
|
|
logsocket
|
|
logzmq
|
|
lua
|
|
msgpack
|
|
nagios
|
|
notfound
|
|
pam
|
|
ping
|
|
pty
|
|
python:python3
|
|
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
|
|
"
|
|
|
|
for _p in $_plugins; do
|
|
subpackages="$subpackages uwsgi-${_p#*:}:_plugin"
|
|
done
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cp "$srcdir"/alpine.buildconf buildconf/alpine.ini
|
|
}
|
|
|
|
build() {
|
|
msg "Building core"
|
|
# ccache seems to trigger some weird bug on musl
|
|
CC="gcc" python3 uwsgiconfig.py --build alpine
|
|
|
|
export UWSGICONFIG_LUAPC="lua5.3"
|
|
|
|
local item; for item in $_plugins; do
|
|
_build_plugin "${item%:*}" "${item#*:}"
|
|
done
|
|
}
|
|
|
|
_build_plugin() {
|
|
local plugin="$1"
|
|
local myname="$2"
|
|
|
|
msg "Building $plugin plugin ($myname)"
|
|
python3 uwsgiconfig.py --plugin plugins/$plugin alpine $myname
|
|
}
|
|
|
|
package() {
|
|
install -m 755 -D uwsgi "$pkgdir"/usr/sbin/uwsgi
|
|
install -m 644 -D "$srcdir"/readme.emperor "$pkgdir"/etc/uwsgi/conf.d/readme.emperor
|
|
install -m 644 -D "$srcdir"/uwsgi.ini "$pkgdir"/etc/uwsgi/uwsgi.ini
|
|
install -m 755 -D "$srcdir"/uwsgi.initd "$pkgdir"/etc/init.d/uwsgi
|
|
|
|
install -m 775 -d -o root -g uwsgi "$pkgdir"/var/log/uwsgi
|
|
install -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
_plugin() {
|
|
local name="${subpkgname#"$pkgname"-}"
|
|
pkgdesc="uWSGI plugin $name"
|
|
depends="uwsgi"
|
|
|
|
cd "$builddir"
|
|
|
|
local requires=$(sed '$a print(" ".join(REQUIRES))' \
|
|
plugins/$name/uwsgiplugin.py 2>/dev/null | python3 2>/dev/null)
|
|
|
|
local req; for req in $requires; do
|
|
if echo "$_plugins" | grep -qw "$req"; then
|
|
depends="$depends $pkgname-$req"
|
|
else
|
|
error "There's no subpackage for requirement $req!"
|
|
return 1
|
|
fi
|
|
done
|
|
|
|
install -m 755 -D ${name}_plugin.so \
|
|
"$subpkgdir"/usr/lib/uwsgi/${name}_plugin.so
|
|
|
|
case "$name" in
|
|
# Mitigate breakages caused by injudicious rename in v3.11.
|
|
python3)
|
|
pkgdesc="uWSGI plugin for Python 3"
|
|
provides="uwsgi-python=$pkgver-r$pkgrel"
|
|
replaces="uwsgi-python"
|
|
ln -s python3_plugin.so "$subpkgdir"/usr/lib/uwsgi/python_plugin.so
|
|
local python_libpath=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))")
|
|
install -Dm644 uwsgidecorators.py -t "$subpkgdir/$python_libpath/"
|
|
;;
|
|
# Mitigate breakages caused by injudicious rename in v3.11.
|
|
gevent3)
|
|
pkgdesc="uWSGI plugin for gevent (Python 3)"
|
|
provides="uwsgi-gevent=$pkgver-r$pkgrel"
|
|
replaces="uwsgi-gevent"
|
|
ln -s gevent3_plugin.so "$subpkgdir"/usr/lib/uwsgi/gevent_plugin.so
|
|
local python_libpath=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))")
|
|
install -Dm644 uwsgidecorators.py -t "$subpkgdir/$python_libpath/"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
sha512sums="
|
|
6aaaaae9e067814e430dd80e5ac44e806f937c84f0b38a7ac3f399e92a392a426fe41c23c76371203a31625f985a3f5b397a3294b634c1c7a1280981023bdad1 uwsgi-2.0.29.tar.gz
|
|
8389c5bc34f3b6eb038baeb91269af0e6ba885399bcc094f86caad74befddcb04c2e36ba7399c2722ac0de74b5fafc1f284f83dbfec82d367f3451a3a01f9118 uwsgi.initd
|
|
370202e143d0e041a2e36905346080d3ca592c9a74705a8c4e142a1307d22b921c10e673d683ca284ea27d184474ed86edd7723a6e590d35a562ad7cf6afa529 uwsgi.ini
|
|
2798c9d2e49e29292ffe6a5a29b866301c78d5f322fc5d07dfa9569efdaa5220237a5f6744652fbdd957be29311ddaff190541333f042cbf0e907dfa98ce3e2a readme.emperor
|
|
f3cff00926929a5bb40afafb65fd5228582af35fbf524562282020c4c4ae9c659231b2381f4b3cceb18e8f3f6c888c21bdd8ed4ddcd81e92fbc6a0891800ce38 alpine.buildconf
|
|
d4b93e51619af5f8839cdc7279c69462947910df03104cfe6180d606403940fc60ad5dac66425ce8acbab67cc0c4f3e13126da0a329720cb03c67d447cd94ad9 musl-ucontext.patch
|
|
"
|