PKGBUILDs/community/uwsgi/PKGBUILD

176 lines
8.1 KiB
Bash
Raw Normal View History

2014-07-16 03:06:18 +00:00
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
2019-12-12 14:00:22 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.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
2017-06-07 04:38:41 +00:00
# - dropped mono plugin
2014-07-16 03:06:18 +00:00
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-python
uwsgi-plugin-php
uwsgi-plugin-lua51
uwsgi-plugin-jvm
2015-02-28 14:15:08 +00:00
uwsgi-plugin-webdav
2017-10-25 12:48:05 +00:00
uwsgi-plugin-zabbix
2018-11-20 00:18:38 +00:00
uwsgi-plugin-notfound)
2020-06-21 01:41:47 +00:00
pkgver=2.0.19.1
2020-10-08 00:24:40 +00:00
pkgrel=5
2017-11-20 03:03:37 +00:00
arch=(x86_64)
2014-07-16 03:06:18 +00:00
url="http://projects.unbit.it/$pkgbase"
license=(GPL2)
backup=('etc/uwsgi/emperor.ini')
conflicts=(python-$pkgbase)
2020-07-14 02:30:48 +00:00
makedepends=(gcc python ruby 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
2020-07-14 02:30:48 +00:00
jansson classpath python-gevent systemd)
2016-10-10 12:37:22 +00:00
optdepends=('systemd: daemon scripts')
2017-01-18 20:40:57 +00:00
source=("https://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
2017-03-03 13:26:34 +00:00
emperor.uwsgi.socket
2018-02-05 13:20:44 +00:00
uwsgi.logrotate
uwsgi.sysusers)
2020-06-21 01:41:47 +00:00
sha512sums=('e18359c5ea3606d5de7fb3a0074d777e1c4b41f51f4b1a21f1446f32253058d7924286d9ed8a159d4c6e6c0ea64df7fc3c70b2933c3433b9a9cce39737e702bf'
2017-01-18 20:40:57 +00:00
'68eef703de39cb336915e1e9c36b11c65c2d46482407b0234ca245df0e052952abb7dd85b0a1cd4507c78356a3b7a55424524b3aa0997b559b51e7b20eab5e16'
2017-09-02 14:47:32 +00:00
'acfe9fb089d1905c3d736dbeaaef7eb1848b4ce8d1f585de653086cf7f90c166a1e493d0b62ba030a4bcf2eca9c919e0d6deea2ea1c0bcb8533d7cb040d2f67c'
2017-01-18 20:40:57 +00:00
'4def9dcd06cfc2c6ce554add9d9545a01f3bb2681f0a2a6fc4ba68f91011111803a955cc41b5e70832ca448b196109368fdf874e81b7ec0edee4b51f864e16f7'
2020-10-08 00:24:40 +00:00
'29e51d3f441bd8af23c9378bca6cb38376bbbf31bb3b07f318a04ea5620cf25d35d7799ba4a8ecff12634dccd903eef27a6957b932370706e35549f8fbcd2455'
2017-01-18 20:40:57 +00:00
'fb51a4d102a1bc7d9f7d4c4f310ee65076bcfbc94b47e2dafdf9b20e99a661c5f938185dcf698437d81409376f0276b966f09b13c8a29462c48612df43c3f3ef'
'162ca1be96282b32e8e6be919b6315bfd08954c491056958985bf99e7f5bdad3511665f059329d6cb6ef5d222f9aa11d4dc43c72e6a963ab941ada959fe8d964'
'bc30f8ec69abd14fb96ada5b36cf65811a7a63ee27e224fcb6ceabe9935c1f17379cd872149a17da3d590b8ff60fbe7f77140d777aaf06e25e83388f897f611d'
2018-02-05 13:20:44 +00:00
'd54c84838ddb2f389e115ebb81aa2583705c9e330f020e6583b496f9c271ed236b6820c2a065f2b55a79adbf13e262b9ff2428124a8044b8fa20ca29ca4930ac'
2020-10-08 00:24:40 +00:00
'068ada6281fdeb504fed7e47dae2729d047ed810bb596e5268c1821ad275cd32110e801e93e7ba0ee2d92dbc39e1954180cf43d88d2990d42b802ceb54b50a9e'
2017-03-03 13:26:34 +00:00
'592c85270f43b37e9c51aae126533830515b96fff9fcae969ee865fe173bd0550c7729530d5ff1e44ffee43cd5c78c96688ce091c677a4196379e24983c0180e'
2018-02-05 13:20:44 +00:00
'937878372aa1556f6ba62ad7148d1681288c94d6cff609368a9e861dd4d4524330006a08ae5993441f7d3101170e3a0a681a4c8b3c2c13b364b8b1f81cf25117'
'9e9eab08199cf08810ec95b0697cd8817226986d1e3aeb54845c0140ea5887360580348f295060c0558fb2d6aaed26fec929ea36b28cfeaf2b3588ce40fec3df')
2014-07-16 03:06:18 +00:00
2015-02-28 14:15:08 +00:00
prepare() {
2020-07-14 02:30:48 +00:00
cd $pkgbase-$pkgver
cp "$srcdir"/archlinux.ini buildconf/archlinux.ini
2020-06-21 01:41:47 +00:00
for patch in uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
2020-07-14 02:30:48 +00:00
patch -Np1 -i "$srcdir"/$patch
2014-07-16 03:06:18 +00:00
done
rm -rf plugins/ruby
mv plugins/ruby{19,}
sed -i 's:\(ruby\)19:\1:' plugins/ruby/uwsgiplugin.py
2017-04-24 18:48:29 +00:00
sed -i 's/--cflags mono-2/--cflags mono-2 glib-2.0/g' plugins/mono/uwsgiplugin.py
2020-07-14 02:30:48 +00:00
cp "$srcdir"/uwsgiplugin.py plugins/systemd_logger/uwsgiplugin.py
2014-07-16 03:06:18 +00:00
}
2017-09-02 14:47:32 +00:00
2014-07-16 03:06:18 +00:00
build() {
2020-07-14 02:30:48 +00:00
pushd "$srcdir"/$pkgbase-$pkgver
2015-02-28 14:15:08 +00:00
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
2020-07-14 02:30:48 +00:00
python uwsgiconfig.py --plugin plugins/zabbix archlinux zabbix
python uwsgiconfig.py --plugin plugins/notfound archlinux notfound
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"
2018-07-07 17:50:53 +00:00
depends=(libxml2 jansson libsystemd libcap pam pcre)
2015-02-28 14:15:08 +00:00
install=uwsgi.install
2020-07-14 02:30:48 +00:00
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
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"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/cgi_plugin.so "$pkgdir"/usr/lib/uwsgi/cgi_plugin.so
2014-12-10 19:45:49 +00:00
}
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"
2020-07-14 02:30:48 +00:00
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-07-16 03:06:18 +00:00
}
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"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/psgi_plugin.so "$pkgdir"/usr/lib/uwsgi/psgi_plugin.so
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"
2020-07-14 02:30:48 +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
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/
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"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/lua_plugin.so "$pkgdir"/usr/lib/uwsgi/lua_plugin.so
2014-07-16 03:06:18 +00:00
}
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"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/php_plugin.so "$pkgdir"/usr/lib/uwsgi/php_plugin.so
2014-07-16 03:06:18 +00:00
}
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"
2020-07-14 02:30:48 +00:00
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-07-16 03:06:18 +00:00
}
2015-02-28 14:15:08 +00:00
package_uwsgi-plugin-webdav() {
depends=(uwsgi)
pkgdesc="Plugin for webdav support"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/webdav_plugin.so "$pkgdir"/usr/lib/uwsgi/webdav_plugin.so
2015-02-28 14:15:08 +00:00
}
2017-10-25 12:48:05 +00:00
package_uwsgi-plugin-zabbix() {
depends=(uwsgi)
pkgdesc="Plugin for zabbix support"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/zabbix_plugin.so "$pkgdir"/usr/lib/uwsgi/zabbix_plugin.so
2017-10-25 12:48:05 +00:00
}
2018-07-17 23:38:56 +00:00
package_uwsgi-plugin-notfound() {
depends=(uwsgi)
pkgdesc="Plugin for notfound support"
2020-07-14 02:30:48 +00:00
install -Dm755 $pkgbase-$pkgver/notfound_plugin.so "$pkgdir"/usr/lib/uwsgi/notfound_plugin.so
2018-07-17 23:38:56 +00:00
}