60 lines
1.6 KiB
Bash
60 lines
1.6 KiB
Bash
# Template file for 'uwsgi'
|
|
pkgname=uwsgi
|
|
version=2.0.27
|
|
revision=1
|
|
hostmakedepends="python3-setuptools"
|
|
makedepends="python3-devel openssl-devel"
|
|
short_desc="Fast, self-healing application container server"
|
|
maintainer="Duncaen <duncaen@voidlinux.org>"
|
|
license="GPL-2.0-only WITH GCC-exception-2.0"
|
|
homepage="https://uwsgi-docs.readthedocs.io/en/latest/"
|
|
changelog="https://raw.githubusercontent.com/unbit/uwsgi-docs/master/Changelog-${version}.rst"
|
|
distfiles="https://github.com/unbit/uwsgi/archive/${version}.tar.gz"
|
|
checksum=a2e1d06dcb12c6566e771aeefa0a5d880c102c77d4c8a3627e2a355c98da855e
|
|
|
|
_libdir=usr/lib/uwsgi
|
|
|
|
pre_configure() {
|
|
vsed -i uwsgiconfig.py -e "s|uc.get('plugin_dir')|'.'|"
|
|
vsed -i buildconf/base.ini -e "s|\(plugin_dir =\).*|\1 /$_libdir|"
|
|
}
|
|
|
|
do_build() {
|
|
local _cflags="$CFLAGS"
|
|
local _ldflags="$LDFLAGS"
|
|
|
|
python3 uwsgiconfig.py --build core
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
_cflags="$CFLAGS -I${XBPS_CROSS_BASE}/${py3_inc}
|
|
-I${XBPS_CROSS_BASE}/usr/include"
|
|
_ldflags="$LDFLAGS -L${XBPS_CROSS_BASE}/${py3_lib}
|
|
-L${XBPS_CROSS_BASE}/usr/lib"
|
|
fi
|
|
|
|
CFLAGS="$_cflags" LDFLAGS="$_ldflags" python3 uwsgiconfig.py \
|
|
--plugin plugins/python core python3
|
|
CFLAGS="$_cflags" LDFLAGS="$_ldflags" python3 uwsgiconfig.py \
|
|
--plugin plugins/cgi core cgi
|
|
}
|
|
|
|
do_install() {
|
|
vbin uwsgi
|
|
}
|
|
|
|
uwsgi-python3_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc="$short_desc (Python3 plugin)"
|
|
pkg_install() {
|
|
vinstall python3_plugin.so 644 $_libdir
|
|
}
|
|
}
|
|
|
|
uwsgi-cgi_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc="$short_desc (CGI plugin)"
|
|
pkg_install() {
|
|
vinstall cgi_plugin.so 644 $_libdir
|
|
}
|
|
}
|