initial import
This commit is contained in:
166
uwsgi/PKGBUILD
Normal file
166
uwsgi/PKGBUILD
Normal file
@@ -0,0 +1,166 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=uwsgi
|
||||
pkgname=(uwsgi
|
||||
uwsgi-plugin-rack
|
||||
uwsgi-plugin-psgi
|
||||
uwsgi-plugin-cgi
|
||||
uwsgi-plugin-tauthon
|
||||
uwsgi-plugin-python
|
||||
uwsgi-plugin-lua51
|
||||
uwsgi-plugin-webdav
|
||||
mod_proxy_uwsgi)
|
||||
pkgver=2.0.15
|
||||
pkgrel=2
|
||||
arch=(i686 x86_64)
|
||||
url="https://projects.unbit.it/uwsgi"
|
||||
license=(custom:GPL-2+Linking-Exception)
|
||||
backup=('etc/uwsgi/emperor.ini')
|
||||
makedepends=('gcc' 'python' 'tauthon' 'ruby' 'tauthon-greenlet' 'python-greenlet'
|
||||
'curl' 'libxml2' 'libyaml' 'perl' 'lua51' 'pcre' 'libedit' 'libressl'
|
||||
'bzip2' 'gmp' 'jansson' 'tauthon-gevent' 'apache' 'quilt')
|
||||
source=(https://projects.unbit.it/downloads/$pkgbase-$pkgver.tar.gz
|
||||
hyperbola.ini
|
||||
uwsgi_ruby20_compatibility.patch
|
||||
uwsgi_trick_chroot.patch
|
||||
uwsgi_fix_build.patch
|
||||
emperor.ini
|
||||
uwsgi.logrotate
|
||||
uwsgi.confd
|
||||
uwsgi.initd)
|
||||
sha512sums=('cb3ce7dc9eb9806151b04b04dc80ac7204cb4ddadf295eea98d5ebbf3a8c02f4b0bfb9a0490997c5edf427e39d3073a2d5b4fe7bd8ec458b30c0aab8e1da9bef'
|
||||
'54042e99421f9c4b213cea4099dd768bdb64c1145dfa85e364416a4044923e1f3ac2b0fcc14a86f14e3471c5296339a70afcc51cd9c7e5790818250dfe42b990'
|
||||
'162ca1be96282b32e8e6be919b6315bfd08954c491056958985bf99e7f5bdad3511665f059329d6cb6ef5d222f9aa11d4dc43c72e6a963ab941ada959fe8d964'
|
||||
'bc30f8ec69abd14fb96ada5b36cf65811a7a63ee27e224fcb6ceabe9935c1f17379cd872149a17da3d590b8ff60fbe7f77140d777aaf06e25e83388f897f611d'
|
||||
'896cc70926afcefb3c96256229691702e93b30974ae5e8f1c1efaa29cc088b855d3515b054547ec1b4a3a68f3c1c3b70656f60bea4f9c1bfc9780a1c462ba959'
|
||||
'41cc29ea14ca87749959379ead773d9a3a499c6bc7be17800e06e33c998a929ae855c9ad0fe2039e26a034c24d2845833945333442b98d7c6f0924aa2a036b1b'
|
||||
'f7f6f4a6e55ba770022dca068723be8fabe50074ea34384ddb3d876f96d279d0890c7d8d624b3cfe62be43e1eab588e072bd4bb3d3d1cd4ef966b317461b80c5'
|
||||
'041d1bd694fad6f7c5e28944aab6d7ba53b3c7fc990ce6b7c2d97b9f3d6650c46dda8069e545c252a7400e1d825c8e46d7393a289757b1bd665e64241ca3789a'
|
||||
'81ed974fb2957e05c890cab29f5b5a75845e6b7de899d2695fb2fa5f49b4545daa437c81c8dc5c735b24a45655cf6320c9256bc8faa7e32ffd7a2d981922def5')
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/$pkgbase-$pkgver
|
||||
cp $srcdir/hyperbola.ini buildconf/hyperbola.ini
|
||||
|
||||
# we don't systemd and remove it therefore
|
||||
rm -rv plugins/systemd_logger
|
||||
|
||||
# additional steps before starting to build
|
||||
cp -r plugins/python plugins/tauthon
|
||||
for patch in uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch uwsgi_fix_build.patch; do
|
||||
patch -Np1 -i $srcdir/$patch
|
||||
done
|
||||
rm -rf plugins/ruby
|
||||
mv plugins/ruby{19,}
|
||||
sed -i 's:\(ruby\)19:\1:' plugins/ruby/uwsgiplugin.py
|
||||
}
|
||||
|
||||
build() {
|
||||
pushd $srcdir/$pkgbase-$pkgver
|
||||
|
||||
export UWSGICONFIG_LUAPC='lua51'
|
||||
|
||||
python uwsgiconfig.py --build hyperbola
|
||||
python uwsgiconfig.py --plugin plugins/python hyperbola python
|
||||
python uwsgiconfig.py --plugin plugins/greenlet hyperbola greenlet
|
||||
python uwsgiconfig.py --plugin plugins/gevent hyperbola gevent
|
||||
python uwsgiconfig.py --plugin plugins/asyncio hyperbola asyncio
|
||||
|
||||
tauthon uwsgiconfig.py --plugin plugins/tauthon hyperbola tauthon
|
||||
tauthon uwsgiconfig.py --plugin plugins/greenlet hyperbola greenlet2
|
||||
tauthon uwsgiconfig.py --plugin plugins/gevent hyperbola gevent2
|
||||
|
||||
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=(tauthon libxml2 jansson libyaml libcap pcre)
|
||||
backup+=('etc/conf.d/uwsgi')
|
||||
cd $srcdir/$pkgbase-$pkgver
|
||||
install -Dm755 uwsgi $pkgdir/usr/bin/uwsgi
|
||||
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
install -Dm644 $srcdir/uwsgi.confd $pkgdir/etc/conf.d/uwsgi
|
||||
install -Dm755 $srcdir/uwsgi.initd $pkgdir/etc/init.d/uwsgi
|
||||
install -Dm644 $srcdir/emperor.ini $pkgdir/etc/uwsgi/emperor.ini
|
||||
install -Dm644 $srcdir/uwsgi.logrotate $pkgdir/etc/logrotate.d/uwsgi
|
||||
}
|
||||
|
||||
package_uwsgi-plugin-cgi() {
|
||||
depends=(uwsgi)
|
||||
pkgdesc="CGI plugin for uwsgi"
|
||||
install -Dm755 $pkgbase-$pkgver/cgi_plugin.so $pkgdir/usr/lib/uwsgi/cgi_plugin.so
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
package_uwsgi-plugin-rack() {
|
||||
depends=(uwsgi ruby)
|
||||
pkgdesc="Ruby rack plugin for uwsgi"
|
||||
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 -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
package_uwsgi-plugin-psgi() {
|
||||
depends=(uwsgi perl)
|
||||
pkgdesc="Perl psgi plugin for uwsgi"
|
||||
install -Dm755 $pkgbase-$pkgver/psgi_plugin.so $pkgdir/usr/lib/uwsgi/psgi_plugin.so
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
# 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-tauthon() {
|
||||
depends=(uwsgi tauthon-gevent tauthon-greenlet)
|
||||
pkgdesc="Plugin for Tauthon-support for uwsgi"
|
||||
install -Dm755 $pkgbase-$pkgver/tauthon_plugin.so $pkgdir/usr/lib/uwsgi/tauthon_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/tauthon2.8/site-packages/uwsgidecorators.py
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
tauthon -m compileall $pkgdir/usr/lib/tauthon2.8/site-packages/
|
||||
tauthon -O -m compileall $pkgdir/usr/lib/tauthon2.8/site-packages/
|
||||
}
|
||||
|
||||
package_uwsgi-plugin-python() {
|
||||
depends=(uwsgi python python-greenlet)
|
||||
pkgdesc="Plugin for Python-support for uwsgi"
|
||||
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
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
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 for uwsgi"
|
||||
install -Dm755 $pkgbase-$pkgver/lua_plugin.so $pkgdir/usr/lib/uwsgi/lua_plugin.so
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
package_uwsgi-plugin-webdav() {
|
||||
depends=(uwsgi)
|
||||
pkgdesc="Plugin for webdav support for uwsgi"
|
||||
install -Dm755 $pkgbase-$pkgver/webdav_plugin.so $pkgdir/usr/lib/uwsgi/webdav_plugin.so
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
package_mod_proxy_uwsgi(){
|
||||
depends=(uwsgi apache)
|
||||
pkgdesc="Apache uWSGI proxy module for uwsgi"
|
||||
install -Dm755 \
|
||||
$pkgbase-$pkgver/apache2/.libs/mod_proxy_uwsgi.so \
|
||||
$pkgdir/usr/lib/httpd/modules/mod_proxy_uwsgi.so
|
||||
install -Dm644 $pkgbase-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
Reference in New Issue
Block a user