summaryrefslogtreecommitdiffstats
path: root/testing/uwsgi/APKBUILD
blob: ee07b4d340f8bcfca35ba9918ba56cab1f7488b3 (plain)
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
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer:
pkgname=uwsgi
pkgver=1.4.3
pkgrel=0
pkgdesc="uWSGI application container server"
url=http://projects.unbit.it/uwsgi/
arch=all
license=GPL-2
makedepends="linux-headers lua-dev python python-dev"
subpackages="uwsgi-lua uwsgi-python:py"
source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz futimes.patch include-sched.patch"

_builddir=$srcdir/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export CFLAGS=-D_GNU_SOURCE

	msg "building core"
	python uwsgiconfig.py --build core || return 1

	msg "building lua plugin"
	UWSGICONFIG_LUALIB="lua" \
		python uwsgiconfig.py --plugin plugins/lua core || return 1

	msg "building python plugin"
	python uwsgiconfig.py --plugin plugins/python core || return 1
}

package() {
	cd "$_builddir"

	local bindir=$pkgdir/usr/sbin
	install -d "$bindir"
	install uwsgi "$bindir"

	local libdir=$pkgdir/usr/lib/uwsgi
	install -d "$libdir"
	install *_plugin.so "$libdir"
}

lua() {
	depends=uwsgi
      
	mkdir -p "$subpkgdir"/usr/lib/uwsgi
	mv "$pkgdir/usr/lib/uwsgi/lua_plugin.so" "$subpkgdir/usr/lib/uwsgi"
}

py() {
	depends=uwsgi

	mkdir -p "$subpkgdir"/usr/lib/uwsgi
	mv "$pkgdir/usr/lib/uwsgi/python_plugin.so" "$subpkgdir/usr/lib/uwsgi"
}

md5sums="98561cfdb93fb72ed68b7afb2ae4df3a  uwsgi-1.4.3.tar.gz
2c9aeb5b2adf1fa45ef4ed6bda47236a  futimes.patch
02c43e001d5f44eb421079e17f9db003  include-sched.patch"