PKGBUILDs/community/uwsgi/PKGBUILD

196 lines
7.8 KiB
Bash
Raw Normal View History

2014-07-16 03:06:18 +00:00
# $Id$
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
2014-12-10 19:45:49 +00:00
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2014-07-16 03:06:18 +00:00
# Contributor: Valentin Hăloiu <vially.ichb+aur@gmail.com>
2014-12-10 19:45:49 +00:00
# Contributor: Angel Velasquez <angvp@archlinux.org>
2014-07-16 03:06:18 +00:00
# Contributor: Kevin Zuber <uKev@knet.eu>
# Contributor: Vsevolod Balashov <vsevolod@balashov.name>
2014-12-10 19:45:49 +00:00
# Contributor: David Runge <dave@sleepmap.de>
2014-07-16 03:06:18 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - ripped out pypy stuff
pkgbase=uwsgi
pkgname=(uwsgi
2014-11-21 14:12:14 +00:00
uwsgi-plugin-rack
uwsgi-plugin-psgi
2014-12-10 19:45:49 +00:00
uwsgi-plugin-cgi
2014-11-21 14:12:14 +00:00
uwsgi-plugin-python2
uwsgi-plugin-python
uwsgi-plugin-php
uwsgi-plugin-lua51
uwsgi-plugin-jvm
2015-01-04 07:12:07 +00:00
uwsgi-plugin-mono
2015-02-28 14:15:08 +00:00
uwsgi-plugin-webdav
2015-01-04 07:12:07 +00:00
mod_proxy_uwsgi)
2016-10-10 12:37:22 +00:00
pkgver=2.0.14
2017-01-11 00:36:02 +00:00
pkgrel=5
2014-07-16 03:06:18 +00:00
arch=(i686 x86_64)
url="http://projects.unbit.it/$pkgbase"
license=(GPL2)
backup=('etc/uwsgi/emperor.ini')
conflicts=(python-$pkgbase)
2016-01-02 17:43:42 +00:00
makedepends=(gcc python python2 ruby python2-greenlet python-greenlet php-embed curl libxml2 libyaml
2014-07-16 03:06:18 +00:00
perl lua51 pcre libedit openssl bzip2 gmp pam java-environment=7
2015-01-04 07:12:07 +00:00
jansson classpath mono python2-gevent apache)
2016-10-10 12:37:22 +00:00
optdepends=('systemd: daemon scripts')
2014-07-16 03:06:18 +00:00
source=(http://projects.unbit.it/downloads/$pkgbase-$pkgver.tar.gz
2016-03-03 13:07:22 +00:00
uwsgiplugin.py::https://raw.githubusercontent.com/unbit/uwsgi/9787f6882c2475aa9873e400988160b17dd04545/plugins/systemd_logger/uwsgiplugin.py
2014-07-16 03:06:18 +00:00
archlinux.ini
tmpfilesd
2014-11-21 14:12:14 +00:00
uwsgi_at.service
uwsgi_at.socket
2014-07-16 03:06:18 +00:00
uwsgi_ruby20_compatibility.patch
uwsgi_trick_chroot.patch
emperor.ini
emperor.uwsgi.service
emperor.uwsgi.socket)
2016-10-10 12:37:22 +00:00
md5sums=('d4b2c7db274dc20be54a977c9b040b7e'
2016-03-03 13:07:22 +00:00
'd3c9f32479d816208c3620a782fa5246'
2015-02-28 14:15:08 +00:00
'9aced0faffc5fc04afccf946e8a2a886'
2014-07-16 03:06:18 +00:00
'752475ee32286acfbafa49b898616817'
2014-12-28 19:57:15 +00:00
'feaf107977aec047101acdbf06810f30'
2014-07-16 03:06:18 +00:00
'ea381549fe65a5d72fa1abb5ceb7d3ef'
'4d09535ce379c8acd76160f35d5d6b55'
2016-05-10 12:12:55 +00:00
'a49705b98c28dee890b2f88cbaa58be3'
2014-07-16 03:06:18 +00:00
'5fa14ddea9a3dae17b5be28468d47b80'
2014-12-28 19:57:15 +00:00
'25dfcc365241f16d7ea16f7143698b53'
2014-07-16 03:06:18 +00:00
'3ab4486e02f5c217566fb6c8d469c246')
2015-02-28 14:15:08 +00:00
prepare() {
2014-07-16 03:06:18 +00:00
cd $srcdir/$pkgbase-$pkgver
cp $srcdir/archlinux.ini buildconf/archlinux.ini
2016-01-02 17:43:42 +00:00
for patch in uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
2016-05-10 12:12:55 +00:00
msg2 "Applying $patch"
2014-07-16 03:06:18 +00:00
patch -Np1 -i $srcdir/$patch
done
rm -rf plugins/ruby
mv plugins/ruby{19,}
sed -i 's:\(ruby\)19:\1:' plugins/ruby/uwsgiplugin.py
2016-03-03 13:07:22 +00:00
cp $srcdir/uwsgiplugin.py plugins/systemd_logger/uwsgiplugin.py
2014-07-16 03:06:18 +00:00
}
build() {
2015-02-28 14:15:08 +00:00
pushd $srcdir/$pkgbase-$pkgver
2016-10-10 12:37:22 +00:00
export UWSGICONFIG_LUAPC='lua51'
2015-02-28 14:15:08 +00:00
python uwsgiconfig.py --build archlinux
python uwsgiconfig.py --plugin plugins/python archlinux python
python uwsgiconfig.py --plugin plugins/greenlet archlinux greenlet
2016-03-12 14:11:11 +00:00
python uwsgiconfig.py --plugin plugins/gevent archlinux gevent
2015-02-28 14:15:08 +00:00
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
pushd $srcdir/$pkgbase-$pkgver/apache2
/usr/bin/apxs -c mod_proxy_uwsgi.c
2014-07-16 03:06:18 +00:00
}
package_uwsgi() {
2015-02-28 14:15:08 +00:00
pkgdesc="A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C"
2016-01-07 13:34:40 +00:00
depends=(python2 libxml2 jansson libyaml libsystemd libcap pam pcre)
2015-02-28 14:15:08 +00:00
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
2014-07-16 03:06:18 +00:00
}
2014-12-10 19:45:49 +00:00
package_uwsgi-plugin-cgi() {
depends=(uwsgi)
pkgdesc="CGI plugin"
install -Dm755 $pkgbase-$pkgver/cgi_plugin.so $pkgdir/usr/lib/uwsgi/cgi_plugin.so
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-rack() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi ruby)
2014-07-16 03:06:18 +00:00
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
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-psgi() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi perl)
2014-07-16 03:06:18 +00:00
pkgdesc="Perl psgi plugin"
install -Dm755 $pkgbase-$pkgver/psgi_plugin.so $pkgdir/usr/lib/uwsgi/psgi_plugin.so
2015-06-28 11:40:59 +00:00
# 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;
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-python2() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi python2-gevent python2-greenlet)
2014-07-16 03:06:18 +00:00
pkgdesc="Plugin for Python2 support"
2014-11-21 14:12:14 +00:00
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
2014-08-28 12:03:41 +00:00
python2 -m compileall $pkgdir/usr/lib/python2.7/site-packages/
python2 -O -m compileall $pkgdir/usr/lib/python2.7/site-packages/
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-python() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi python python-greenlet)
2014-07-16 03:06:18 +00:00
pkgdesc="Plugin for Python support"
2014-11-21 14:12:14 +00:00
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
2016-03-12 14:11:11 +00:00
install -Dm755 $pkgbase-$pkgver/gevent_plugin.so $pkgdir/usr/lib/uwsgi/gevent_plugin.so
2015-02-28 14:15:08 +00:00
install -Dm755 $pkgbase-$pkgver/asyncio_plugin.so $pkgdir/usr/lib/uwsgi/asyncio_plugin.so
2017-01-06 13:38:31 +00:00
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/
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-lua51() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi lua51)
2014-07-16 03:06:18 +00:00
pkgdesc="Plugin for Lua support"
install -Dm755 $pkgbase-$pkgver/lua_plugin.so $pkgdir/usr/lib/uwsgi/lua_plugin.so
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-php() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi php-embed libyaml jansson)
2014-07-16 03:06:18 +00:00
pkgdesc="Plugin for PHP support"
install -Dm755 $pkgbase-$pkgver/php_plugin.so $pkgdir/usr/lib/uwsgi/php_plugin.so
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-jvm() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi java-environment=7 classpath)
2014-07-16 03:06:18 +00:00
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
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-mono() {
2014-12-07 23:54:53 +00:00
depends=(uwsgi mono)
2014-11-21 14:12:14 +00:00
pkgdesc="Plugin for mono support"
install -Dm755 $pkgbase-$pkgver/plugins/mono/uwsgi.dll $pkgdir/usr/lib/mono/2.0/uwsgi.dll
install -Dm755 $pkgbase-$pkgver/mono_plugin.so $pkgdir/usr/lib/uwsgi/mono_plugin.so
2014-07-16 03:06:18 +00:00
}
2015-01-04 07:12:07 +00:00
2015-02-28 14:15:08 +00:00
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
}
2015-01-04 07:12:07 +00:00
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
}