mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
200 lines
9.2 KiB
Bash
200 lines
9.2 KiB
Bash
# $Id$
|
|
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
|
|
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
|
# Contributor: Valentin Hăloiu <vially.ichb+aur@gmail.com>
|
|
# Contributor: Angel Velasquez <angvp@archlinux.org>
|
|
# Contributor: Kevin Zuber <uKev@knet.eu>
|
|
# Contributor: Vsevolod Balashov <vsevolod@balashov.name>
|
|
# Contributor: David Runge <dave@sleepmap.de>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - ripped out pypy stuff
|
|
# - dropped mono plugin
|
|
|
|
pkgbase=uwsgi
|
|
pkgname=(uwsgi
|
|
uwsgi-plugin-rack
|
|
uwsgi-plugin-psgi
|
|
uwsgi-plugin-cgi
|
|
uwsgi-plugin-python2
|
|
uwsgi-plugin-python
|
|
uwsgi-plugin-php
|
|
uwsgi-plugin-lua51
|
|
uwsgi-plugin-jvm
|
|
uwsgi-plugin-webdav
|
|
uwsgi-plugin-zabbix
|
|
mod_proxy_uwsgi)
|
|
pkgver=2.0.15
|
|
pkgrel=7
|
|
arch=(x86_64)
|
|
url="http://projects.unbit.it/$pkgbase"
|
|
license=(GPL2)
|
|
backup=('etc/uwsgi/emperor.ini')
|
|
conflicts=(python-$pkgbase)
|
|
makedepends=(gcc python python2 ruby python2-greenlet python-greenlet php-embed curl libxml2 libyaml
|
|
perl lua51 pcre libedit openssl bzip2 gmp pam java-environment=7
|
|
jansson classpath python2-gevent apache systemd)
|
|
optdepends=('systemd: daemon scripts')
|
|
source=("https://projects.unbit.it/downloads/$pkgbase-$pkgver.tar.gz"
|
|
uwsgiplugin.py::https://raw.githubusercontent.com/unbit/uwsgi/9787f6882c2475aa9873e400988160b17dd04545/plugins/systemd_logger/uwsgiplugin.py
|
|
archlinux.ini
|
|
tmpfilesd
|
|
uwsgi_at.service
|
|
uwsgi_at.socket
|
|
uwsgi_ruby20_compatibility.patch
|
|
uwsgi_trick_chroot.patch
|
|
emperor.ini
|
|
emperor.uwsgi.service
|
|
emperor.uwsgi.socket
|
|
uwsgi.logrotate)
|
|
sha512sums=('cb3ce7dc9eb9806151b04b04dc80ac7204cb4ddadf295eea98d5ebbf3a8c02f4b0bfb9a0490997c5edf427e39d3073a2d5b4fe7bd8ec458b30c0aab8e1da9bef'
|
|
'68eef703de39cb336915e1e9c36b11c65c2d46482407b0234ca245df0e052952abb7dd85b0a1cd4507c78356a3b7a55424524b3aa0997b559b51e7b20eab5e16'
|
|
'acfe9fb089d1905c3d736dbeaaef7eb1848b4ce8d1f585de653086cf7f90c166a1e493d0b62ba030a4bcf2eca9c919e0d6deea2ea1c0bcb8533d7cb040d2f67c'
|
|
'4def9dcd06cfc2c6ce554add9d9545a01f3bb2681f0a2a6fc4ba68f91011111803a955cc41b5e70832ca448b196109368fdf874e81b7ec0edee4b51f864e16f7'
|
|
'c0c1a5c2d31cdb7e0dc878ea3d0b6025532fb640ae7cf4d5f1eed2f89987e625c8dc7844d367283ed560fb3ef37915e3e9199be2e1b06fc4586ca862a653b4b5'
|
|
'fb51a4d102a1bc7d9f7d4c4f310ee65076bcfbc94b47e2dafdf9b20e99a661c5f938185dcf698437d81409376f0276b966f09b13c8a29462c48612df43c3f3ef'
|
|
'162ca1be96282b32e8e6be919b6315bfd08954c491056958985bf99e7f5bdad3511665f059329d6cb6ef5d222f9aa11d4dc43c72e6a963ab941ada959fe8d964'
|
|
'bc30f8ec69abd14fb96ada5b36cf65811a7a63ee27e224fcb6ceabe9935c1f17379cd872149a17da3d590b8ff60fbe7f77140d777aaf06e25e83388f897f611d'
|
|
'41cc29ea14ca87749959379ead773d9a3a499c6bc7be17800e06e33c998a929ae855c9ad0fe2039e26a034c24d2845833945333442b98d7c6f0924aa2a036b1b'
|
|
'83a6859d729bf186236aaa7fb7433415f6b985f17e05b7ac571d8919bbf1fb9bd577b4f673d9787dea09752e3d8043f47ce3d9c7d5690faaa1365e477e6c9388'
|
|
'592c85270f43b37e9c51aae126533830515b96fff9fcae969ee865fe173bd0550c7729530d5ff1e44ffee43cd5c78c96688ce091c677a4196379e24983c0180e'
|
|
'f7f6f4a6e55ba770022dca068723be8fabe50074ea34384ddb3d876f96d279d0890c7d8d624b3cfe62be43e1eab588e072bd4bb3d3d1cd4ef966b317461b80c5')
|
|
|
|
prepare() {
|
|
cd $srcdir/$pkgbase-$pkgver
|
|
cp $srcdir/archlinux.ini buildconf/archlinux.ini
|
|
for patch in uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
|
|
msg2 "Applying $patch"
|
|
patch -Np1 -i $srcdir/$patch
|
|
done
|
|
rm -rf plugins/ruby
|
|
mv plugins/ruby{19,}
|
|
sed -i 's:\(ruby\)19:\1:' plugins/ruby/uwsgiplugin.py
|
|
|
|
sed -i 's/--cflags mono-2/--cflags mono-2 glib-2.0/g' plugins/mono/uwsgiplugin.py
|
|
|
|
cp $srcdir/uwsgiplugin.py plugins/systemd_logger/uwsgiplugin.py
|
|
}
|
|
|
|
build() {
|
|
pushd $srcdir/$pkgbase-$pkgver
|
|
|
|
export UWSGICONFIG_LUAPC='lua51'
|
|
|
|
python uwsgiconfig.py --build archlinux
|
|
python uwsgiconfig.py --plugin plugins/python archlinux python
|
|
python uwsgiconfig.py --plugin plugins/greenlet archlinux greenlet
|
|
python uwsgiconfig.py --plugin plugins/gevent archlinux gevent
|
|
python uwsgiconfig.py --plugin plugins/asyncio archlinux asyncio
|
|
python2 uwsgiconfig.py --plugin plugins/python archlinux python2
|
|
python2 uwsgiconfig.py --plugin plugins/greenlet archlinux greenlet2
|
|
python2 uwsgiconfig.py --plugin plugins/gevent archlinux gevent2
|
|
python2 uwsgiconfig.py --plugin plugins/zabbix archlinux zabbix
|
|
|
|
pushd $srcdir/$pkgbase-$pkgver/apache2
|
|
/usr/bin/apxs -c mod_proxy_uwsgi.c
|
|
}
|
|
|
|
package_uwsgi() {
|
|
pkgdesc="A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C"
|
|
depends=(python2 libxml2 jansson libyaml libsystemd libcap pam pcre)
|
|
install=uwsgi.install
|
|
cd $srcdir/$pkgbase-$pkgver
|
|
install -Dm755 uwsgi $pkgdir/usr/bin/uwsgi
|
|
install -Dm644 $srcdir/uwsgi_at.service $pkgdir/usr/lib/systemd/system/uwsgi@.service
|
|
install -Dm644 $srcdir/uwsgi_at.socket $pkgdir/usr/lib/systemd/system/uwsgi@.socket
|
|
install -Dm644 $srcdir/emperor.uwsgi.service $pkgdir/usr/lib/systemd/system/emperor.uwsgi.service
|
|
install -Dm644 $srcdir/emperor.uwsgi.socket $pkgdir/usr/lib/systemd/system/emperor.uwsgi.socket
|
|
install -Dm644 $srcdir/emperor.ini $pkgdir/etc/uwsgi/emperor.ini
|
|
install -Dm644 $srcdir/tmpfilesd $pkgdir/usr/lib/tmpfiles.d/uwsgi.conf
|
|
install -Dm644 $srcdir/uwsgi.logrotate $pkgdir/etc/logrotate.d/uwsgi
|
|
}
|
|
|
|
package_uwsgi-plugin-cgi() {
|
|
depends=(uwsgi)
|
|
pkgdesc="CGI plugin"
|
|
install -Dm755 $pkgbase-$pkgver/cgi_plugin.so $pkgdir/usr/lib/uwsgi/cgi_plugin.so
|
|
}
|
|
|
|
package_uwsgi-plugin-rack() {
|
|
depends=(uwsgi ruby)
|
|
pkgdesc="Ruby rack plugin"
|
|
install -Dm755 $pkgbase-$pkgver/rack_plugin.so $pkgdir/usr/lib/uwsgi/rack_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/fiber_plugin.so $pkgdir/usr/lib/uwsgi/fiber_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/rbthreads_plugin.so $pkgdir/usr/lib/uwsgi/rbthreads_plugin.so
|
|
}
|
|
|
|
package_uwsgi-plugin-psgi() {
|
|
depends=(uwsgi perl)
|
|
pkgdesc="Perl psgi plugin"
|
|
install -Dm755 $pkgbase-$pkgver/psgi_plugin.so $pkgdir/usr/lib/uwsgi/psgi_plugin.so
|
|
# template start; name=perl-binary-module-dependency; version=1;
|
|
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
|
|
_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
|
|
_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
|
|
depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
|
|
fi
|
|
# template end;
|
|
}
|
|
|
|
package_uwsgi-plugin-python2() {
|
|
depends=(uwsgi python2-gevent python2-greenlet)
|
|
pkgdesc="Plugin for Python2 support"
|
|
install -Dm755 $pkgbase-$pkgver/python2_plugin.so $pkgdir/usr/lib/uwsgi/python2_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/greenlet2_plugin.so $pkgdir/usr/lib/uwsgi/greenlet2_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/gevent2_plugin.so $pkgdir/usr/lib/uwsgi/gevent2_plugin.so
|
|
install -Dm644 $pkgbase-$pkgver/uwsgidecorators.py $pkgdir/usr/lib/python2.7/site-packages/uwsgidecorators.py
|
|
python2 -m compileall $pkgdir/usr/lib/python2.7/site-packages/
|
|
python2 -O -m compileall $pkgdir/usr/lib/python2.7/site-packages/
|
|
}
|
|
|
|
package_uwsgi-plugin-python() {
|
|
depends=(uwsgi python python-greenlet)
|
|
pkgdesc="Plugin for Python support"
|
|
install -Dm755 $pkgbase-$pkgver/python_plugin.so $pkgdir/usr/lib/uwsgi/python_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/greenlet_plugin.so $pkgdir/usr/lib/uwsgi/greenlet_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/gevent_plugin.so $pkgdir/usr/lib/uwsgi/gevent_plugin.so
|
|
install -Dm755 $pkgbase-$pkgver/asyncio_plugin.so $pkgdir/usr/lib/uwsgi/asyncio_plugin.so
|
|
install -Dm644 $pkgbase-$pkgver/uwsgidecorators.py $pkgdir/usr/lib/python3.6/site-packages/uwsgidecorators.py
|
|
python -m compileall $pkgdir/usr/lib/python3.6/site-packages/
|
|
python -O -m compileall $pkgdir/usr/lib/python3.6/site-packages/
|
|
}
|
|
|
|
package_uwsgi-plugin-lua51() {
|
|
depends=(uwsgi lua51)
|
|
pkgdesc="Plugin for Lua support"
|
|
install -Dm755 $pkgbase-$pkgver/lua_plugin.so $pkgdir/usr/lib/uwsgi/lua_plugin.so
|
|
}
|
|
|
|
package_uwsgi-plugin-php() {
|
|
depends=(uwsgi php-embed libyaml jansson)
|
|
pkgdesc="Plugin for PHP support"
|
|
install -Dm755 $pkgbase-$pkgver/php_plugin.so $pkgdir/usr/lib/uwsgi/php_plugin.so
|
|
}
|
|
|
|
package_uwsgi-plugin-jvm() {
|
|
depends=(uwsgi java-environment=7 classpath)
|
|
pkgdesc="Plugin for Jvm support"
|
|
install -Dm644 $pkgbase-$pkgver/plugins/jvm/uwsgi.jar $pkgdir/usr/share/java/uwsgi.jar
|
|
install -Dm755 $pkgbase-$pkgver/jvm_plugin.so $pkgdir/usr/lib/uwsgi/jvm_plugin.so
|
|
}
|
|
|
|
package_uwsgi-plugin-webdav() {
|
|
depends=(uwsgi)
|
|
pkgdesc="Plugin for webdav support"
|
|
install -Dm755 $pkgbase-$pkgver/webdav_plugin.so $pkgdir/usr/lib/uwsgi/webdav_plugin.so
|
|
}
|
|
|
|
package_uwsgi-plugin-zabbix() {
|
|
depends=(uwsgi)
|
|
pkgdesc="Plugin for zabbix support"
|
|
install -Dm755 $pkgbase-$pkgver/zabbix_plugin.so $pkgdir/usr/lib/uwsgi/zabbix_plugin.so
|
|
}
|
|
|
|
package_mod_proxy_uwsgi(){
|
|
depends=(uwsgi apache)
|
|
pkgdesc="Apache uWSGI proxy module"
|
|
install -Dm755 \
|
|
$pkgbase-$pkgver/apache2/.libs/mod_proxy_uwsgi.so \
|
|
$pkgdir/usr/lib/httpd/modules/mod_proxy_uwsgi.so
|
|
}
|