summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-26 02:59:13 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-26 02:59:13 +0000
commitfae9d57083c34b6c60bc13534cc08041aeb70515 (patch)
treefc35a09bcb2acfd1584726e161e0c28cd0cdeb1d /user
parentd4ef4abd01034588267d9a17a55e6c0fff72c4fc (diff)
downloadpackages-fae9d57083c34b6c60bc13534cc08041aeb70515.tar.gz
packages-fae9d57083c34b6c60bc13534cc08041aeb70515.tar.bz2
packages-fae9d57083c34b6c60bc13534cc08041aeb70515.tar.xz
packages-fae9d57083c34b6c60bc13534cc08041aeb70515.zip
user/uwsgi: new package
Diffstat (limited to 'user')
-rw-r--r--user/uwsgi/APKBUILD86
1 files changed, 86 insertions, 0 deletions
diff --git a/user/uwsgi/APKBUILD b/user/uwsgi/APKBUILD
new file mode 100644
index 000000000..1e10be30d
--- /dev/null
+++ b/user/uwsgi/APKBUILD
@@ -0,0 +1,86 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=uwsgi
+pkgver=2.0.17.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 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() {
+ cd "$builddir"
+
+ 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() {
+ cd "$builddir"
+ python3 uwsgiconfig.py --check
+}
+
+package() {
+ cd "$builddir"
+ 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"
+}
+
+php() {
+ _plugpack php "PHP"
+}
+
+psgi() {
+ _plugpack psgi "PSGI"
+}
+
+python() {
+ _plugpack python "Python 3"
+}
+
+rack() {
+ _plugpack rack "Ruby Rack"
+}
+
+sha512sums="10d357961fde3a3f5f8e77986cc647313f95a33243e24c2afc482fce21df68a8ae48f90e7b5b76d7edc3cf8fd474d99823d6d60ef7477349abc65a319222f11b uwsgi-2.0.17.1.tar.gz"