summaryrefslogtreecommitdiff
path: root/user/uwsgi/APKBUILD
blob: 340d86175d6698792ca4d9750a9346b29e750190 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=uwsgi
pkgver=2.0.19.1
pkgrel=0
pkgdesc="Web application server"
url="https://projects.unbit.it/uwsgi"
arch="all"
options="!check"  # Requires unpackaged `cppcheck`.
license="GPL-2.0-only"
depends=""
makedepends="libxml2-dev openssl-dev zlib-dev
	perl-dev php7-dev php7-embed python3-dev ruby-dev"
subpackages=""
# Keep psgi at the end for the CFLAGS hack.
_plugins="asyncio cgi corerouter http logfile php python rack psgi"
for _plugin in $_plugins; do
	subpackages="$subpackages $pkgname-$_plugin"
done
source="https://projects.unbit.it/downloads/uwsgi-$pkgver.tar.gz"

build() {
	echo 'plugin_dir = /usr/lib/uwsgi/plugins' >> buildconf/core.ini
	echo 'plugin_build_dir = .' >> buildconf/core.ini

	python3 uwsgiconfig.py --build core

	for _plugin in $_plugins; do
		[ $_plugin != "psgi" ] || export CFLAGS="-D_GNU_SOURCE -include /usr/include/setjmp.h"
		python3 uwsgiconfig.py --plugin plugins/$_plugin core
	done
}

check() {
	python3 uwsgiconfig.py --check
}

package() {
	install -D -m755 "$builddir"/uwsgi "$pkgdir"/usr/bin/uwsgi
}

_plugpack() {
	pkgdesc="$pkgdesc ($2 plugin)"
	depends=""

	install -D -m755 "$builddir"/$1_plugin.so \
		"$subpkgdir"/usr/lib/uwsgi/plugins/$1_plugin.so
}

asyncio() {
	_plugpack asyncio "Python asyncio"
}

cgi() {
	_plugpack cgi "CGI"
}

corerouter() {
	_plugpack corerouter "Core router"
}

http() {
	_plugpack http "HTTP server"
}

logfile() {
	_plugpack logfile "Log file"
}

php() {
	_plugpack php "PHP"
}

psgi() {
	_plugpack psgi "PSGI"
}

python() {
	_plugpack python "Python 3"
}

rack() {
	_plugpack rack "Ruby Rack"
}

sha512sums="e18359c5ea3606d5de7fb3a0074d777e1c4b41f51f4b1a21f1446f32253058d7924286d9ed8a159d4c6e6c0ea64df7fc3c70b2933c3433b9a9cce39737e702bf  uwsgi-2.0.19.1.tar.gz"