community/uwsgi to 2.0.19.1-3

This commit is contained in:
Kevin Mihelich 2020-07-14 02:30:48 +00:00
parent e0355386a9
commit c645321750

View file

@ -15,7 +15,6 @@ pkgname=(uwsgi
uwsgi-plugin-rack
uwsgi-plugin-psgi
uwsgi-plugin-cgi
uwsgi-plugin-python2
uwsgi-plugin-python
uwsgi-plugin-php
uwsgi-plugin-lua51
@ -24,15 +23,15 @@ pkgname=(uwsgi
uwsgi-plugin-zabbix
uwsgi-plugin-notfound)
pkgver=2.0.19.1
pkgrel=2
pkgrel=3
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
makedepends=(gcc python ruby python-greenlet php-embed curl libxml2 libyaml
perl lua51 pcre libedit openssl bzip2 gmp pam java-environment=7
jansson classpath python2-gevent systemd)
jansson classpath python-gevent 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
@ -62,10 +61,10 @@ sha512sums=('e18359c5ea3606d5de7fb3a0074d777e1c4b41f51f4b1a21f1446f32253058d7924
'9e9eab08199cf08810ec95b0697cd8817226986d1e3aeb54845c0140ea5887360580348f295060c0558fb2d6aaed26fec929ea36b28cfeaf2b3588ce40fec3df')
prepare() {
cd $srcdir/$pkgbase-$pkgver
cp $srcdir/archlinux.ini buildconf/archlinux.ini
cd $pkgbase-$pkgver
cp "$srcdir"/archlinux.ini buildconf/archlinux.ini
for patch in uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
patch -Np1 -i $srcdir/$patch
patch -Np1 -i "$srcdir"/$patch
done
rm -rf plugins/ruby
mv plugins/ruby{19,}
@ -73,11 +72,11 @@ prepare() {
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
cp "$srcdir"/uwsgiplugin.py plugins/systemd_logger/uwsgiplugin.py
}
build() {
pushd $srcdir/$pkgbase-$pkgver
pushd "$srcdir"/$pkgbase-$pkgver
export UWSGICONFIG_LUAPC='lua51'
@ -86,105 +85,91 @@ build() {
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
python2 uwsgiconfig.py --plugin plugins/notfound archlinux notfound
python uwsgiconfig.py --plugin plugins/zabbix archlinux zabbix
python uwsgiconfig.py --plugin plugins/notfound archlinux notfound
}
package_uwsgi() {
pkgdesc="A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C"
depends=(libxml2 jansson 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
install -Dm644 $srcdir/uwsgi.sysusers $pkgdir/usr/lib/sysusers.d/uwsgi.conf
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
install -Dm644 "$srcdir"/uwsgi.sysusers "$pkgdir"/usr/lib/sysusers.d/uwsgi.conf
}
package_uwsgi-plugin-cgi() {
depends=(uwsgi)
pkgdesc="CGI plugin"
install -Dm755 $pkgbase-$pkgver/cgi_plugin.so $pkgdir/usr/lib/uwsgi/cgi_plugin.so
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
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
}
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/
install -Dm755 $pkgbase-$pkgver/psgi_plugin.so "$pkgdir"/usr/lib/uwsgi/psgi_plugin.so
}
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.8/site-packages/uwsgidecorators.py
python -m compileall $pkgdir/usr/lib/python3.8/site-packages/
python -O -m compileall $pkgdir/usr/lib/python3.8/site-packages/
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.8/site-packages/uwsgidecorators.py
python -m compileall "$pkgdir"/usr/lib/python3.8/site-packages/
python -O -m compileall "$pkgdir"/usr/lib/python3.8/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
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
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
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
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
install -Dm755 $pkgbase-$pkgver/zabbix_plugin.so "$pkgdir"/usr/lib/uwsgi/zabbix_plugin.so
}
package_uwsgi-plugin-notfound() {
depends=(uwsgi)
pkgdesc="Plugin for notfound support"
install -Dm755 $pkgbase-$pkgver/notfound_plugin.so $pkgdir/usr/lib/uwsgi/notfound_plugin.so
install -Dm755 $pkgbase-$pkgver/notfound_plugin.so "$pkgdir"/usr/lib/uwsgi/notfound_plugin.so
}