aboutsummaryrefslogtreecommitdiffstats
path: root/main/uwsgi/APKBUILD
blob: 3742688da11689402124f3596e35e01459241813 (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
87
88
89
90
91
92
93
94
95
96
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uwsgi
pkgver=2.0.13.1
pkgrel=2
pkgdesc="uWSGI application container server"
url=http://projects.unbit.it/uwsgi/
arch=all
license=GPL2
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"
source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
	uwsgi.initd
	uwsgi.ini
	readme.emperor
	alpine.buildconf

	musl-fix-python.patch
	"
subpackages=""

builddir=$srcdir/$pkgname-$pkgver

_plugins="lua python router_uwsgi cgi"
for _p in ${_plugins}; do
	subpackages="$subpackages uwsgi-$_p:_$_p"
done

prepare() {
	default_prepare
	cp "$srcdir"/alpine.buildconf buildconf/alpine.ini || return 1
}

build() {
	cd "$builddir"
	msg "building core"
	# ccache seems to trigger some weird bug on musl
	CC="gcc" python uwsgiconfig.py --build alpine || return 1

	export UWSGICONFIG_LUAPC="lua5.2"
	for i in ${_plugins}; do
		msg "building $i plugin"
		python uwsgiconfig.py --plugin plugins/$i alpine || return 1
	done
}

package() {
	cd "$builddir"
	install -D uwsgi \
		"$pkgdir"/usr/sbin/uwsgi || return 1
	install -D "$srcdir"/readme.emperor \
		"$pkgdir"/etc/uwsgi/conf.d || return 1
	install -D "$srcdir"/uwsgi.ini \
		"$pkgdir"/etc/uwsgi/uwsgi.ini return 1
	install -Dm755 "$srcdir"/uwsgi.initd \
		"$pkgdir"/etc/init.d/uwsgi || return 1
	# disable emutramp/mprotect, this is needed for luajit and cffi
	paxmark -em "$pkgdir"/usr/sbin/uwsgi
}

_plugin() {
	cd "$builddir"
	depends=uwsgi
	pkgdesc="$1 plugin for uwsgi"
	install -D "$1_plugin".so \
		"$subpkgdir"/usr/lib/uwsgi/"$1_plugin".so || return 1
}

for _p in $_plugins; do
	eval "_$_p() { _plugin $_p; }"
done

md5sums="e9ec5b2b296ce21b3787e0579d02bade  uwsgi-2.0.13.1.tar.gz
6226e676b95d9d0d7b4520443cb98479  uwsgi.initd
67463bbb7807664d57d5ed89b5a490da  uwsgi.ini
b9b4b9a21a16e2ee686172b7d78ec2b0  readme.emperor
98407f45c566a2c39a34b882e1ac9fe4  alpine.buildconf
87c16f6fe482c9b0eac0d33c51873f45  musl-fix-python.patch"
sha256sums="2eca0c2f12ab76f032154cd147f4d5957d3195a022678d59cb507f4995a48d7f  uwsgi-2.0.13.1.tar.gz
cd6bde9c8e41b09cdc1ad74b21dd119e7b56c999970399f49a035d08e27db768  uwsgi.initd
19fafa3528ce96b1f683c4d02f991c823a6afc9953b65098cb70f5eea2c3b387  uwsgi.ini
0162660ac33712784b1a5ff54db51c46ec8a4af873a813407c0eb9de571d1372  readme.emperor
31fc9c17f17aa067c3b025a3f7a84c6102d24368afcbc237f3d58041083c0875  alpine.buildconf
3838e8e3926a1f6271bb5aa88d309837a3bcd06cd570c499b72ca549326c682e  musl-fix-python.patch"
sha512sums="f85ecc34cfa6c24476475996a16432f9ebd8563e4e9866392dbbf5beebec909b50634651d822bdad54bbae886c913c1502edbf04766bba94138330d46798046d  uwsgi-2.0.13.1.tar.gz
7325ac2b52539060516f2a0bf28da0c5c325d7c462343ba6496055b1c9d78c902e17bf071a374d9ab141e47e29f1b28a8c058b868a9aa9dfb673250c7bababba  uwsgi.initd
ac182ef6ce7526ccea701bcaef940863218c332239caaf6e35c22d44c70a4d6c51e29afeefd8f443335fce666195e1c9f9b51794e3a96d5f8567b49528f44f53  uwsgi.ini
1867cd04599e6577f8f7d0b34241a51bbce6789db982bab509d64a7ccdbeab086bfd342c359cd6ba1d37ea8a217f42a56cecbecf646d12ad4cd258792c8eb61e  readme.emperor
f3cff00926929a5bb40afafb65fd5228582af35fbf524562282020c4c4ae9c659231b2381f4b3cceb18e8f3f6c888c21bdd8ed4ddcd81e92fbc6a0891800ce38  alpine.buildconf
de68b16b44e554a79c073c9befa10566796316dbf4c375b4d6b633d80b0282694cca233f0a70f3d6570584324f14276826bbeb8f38b550c00087a05f9ba9227f  musl-fix-python.patch"