PKGBUILDs/extra/uwsgi/PKGBUILD

270 lines
9 KiB
Bash
Raw Normal View History

2019-12-12 14:00:22 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2021-02-28 21:40:57 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot 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>
2022-10-28 21:46:40 +00:00
# - dropped pypy and mono plugins
# - removed makdepends on pypy and mono
2014-07-16 03:06:18 +00:00
pkgbase=uwsgi
2021-02-28 21:40:57 +00:00
pkgname=(
uwsgi
uwsgi-plugin-rack
uwsgi-plugin-psgi
uwsgi-plugin-cgi
uwsgi-plugin-python
uwsgi-plugin-php
2023-01-14 02:56:44 +00:00
uwsgi-plugin-php-legacy
2021-02-28 21:40:57 +00:00
uwsgi-plugin-lua51
uwsgi-plugin-webdav
uwsgi-plugin-zabbix
uwsgi-plugin-notfound
)
2024-06-06 20:25:16 +00:00
pkgver=2.0.26
pkgrel=1
2021-02-28 21:40:57 +00:00
pkgdesc="A full stack for building hosting services"
2017-11-20 03:03:37 +00:00
arch=(x86_64)
2021-02-28 21:40:57 +00:00
url="https://uwsgi-docs.readthedocs.io/en/latest/"
2024-02-23 17:40:07 +00:00
license=(LicenseRef-GPL-2.0-or-later-with-linking-exception)
2021-02-28 21:40:57 +00:00
makedepends=(
jansson
2024-04-27 16:14:49 +00:00
libcap
2021-02-28 21:40:57 +00:00
libxcrypt
libxml2
lua51
openssl
pam
2024-04-27 16:14:49 +00:00
pcre2
2021-02-28 21:40:57 +00:00
perl
php-embed
2023-01-14 02:56:44 +00:00
php-legacy-embed
2021-02-28 21:40:57 +00:00
python
python-gevent
python-greenlet
ruby
systemd
util-linux
zlib
)
source=(
2022-10-28 21:46:40 +00:00
$pkgbase-$pkgver.tar.gz::https://github.com/unbit/$pkgbase/archive/refs/tags/$pkgver.tar.gz
2021-02-28 21:40:57 +00:00
archlinux.ini
emperor.ini
emperor.uwsgi.service
emperor.uwsgi.socket
uwsgi_at.service
uwsgi_at.socket
uwsgi.logrotate
uwsgi.sysusers
uwsgi.tmpfiles
)
2024-06-06 20:25:16 +00:00
sha512sums=('3bb1c7855a5a83eaff18e69f22618794ede2f6df7c8eee42d34163d3319014272223e2c48d013601cd18a17916c5b91b9a0eb4816608442d389c6ae38c83371c'
2023-01-16 19:44:52 +00:00
'912b2d85cee0907454f2b1eee79fdeb7d7205c7b6a9f2a05cef969205fd4f3ccb9f3260e71a1c19cc910f6408e1e94da93fcca9978e8432273659b7caed34d9a'
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'
2024-03-03 22:13:19 +00:00
'ee9f58b2f896c1acb0482c7bcc5504dafed0b2f8674a403538c36acf9c42d31793173ef7873014e6d37ddeefe257cd905e964bcede101ae465cdc4407d24f7f9'
2021-02-28 21:40:57 +00:00
'fb51a4d102a1bc7d9f7d4c4f310ee65076bcfbc94b47e2dafdf9b20e99a661c5f938185dcf698437d81409376f0276b966f09b13c8a29462c48612df43c3f3ef'
2018-02-05 13:20:44 +00:00
'937878372aa1556f6ba62ad7148d1681288c94d6cff609368a9e861dd4d4524330006a08ae5993441f7d3101170e3a0a681a4c8b3c2c13b364b8b1f81cf25117'
2021-02-28 21:40:57 +00:00
'9e9eab08199cf08810ec95b0697cd8817226986d1e3aeb54845c0140ea5887360580348f295060c0558fb2d6aaed26fec929ea36b28cfeaf2b3588ce40fec3df'
2023-08-07 17:45:12 +00:00
'4def9dcd06cfc2c6ce554add9d9545a01f3bb2681f0a2a6fc4ba68f91011111803a955cc41b5e70832ca448b196109368fdf874e81b7ec0edee4b51f864e16f7')
2024-06-06 20:25:16 +00:00
b2sums=('8ceb521e9da353d0f25b6ab4150ce2935646e349b188ed55ac2234ba76f455b633b1a6afe93ed3bd77653d64ad8327201f2b6b23aedea9844ab22a6b8a581094'
2023-01-16 19:44:52 +00:00
'41a9213d55665c905f71f07c752a74fc7685b2f191381d24f3e1d9691a8dae538aa4344ebe771ffd77ba3c9cd7c52fd9eff54ff876bc399d92256cb86f5b7d53'
2021-02-28 21:40:57 +00:00
'835a1036422e9821cd52ffdf5a6053bdd59fc700d473600bda60b6730746f6c0750c30c85f4139d3ea81c6b6dd10d6849f9406decee3179861c51aca90da6161'
'80aa3c4d3f0310f5029ac01690d2ba718d8c86fa49cd1b4f3fc1bd5ae9eadaed6562bf0a48a0fd611e92f100a8594e08fb4bae58e25765fc2eb648cdf1c60b35'
'b6838c0c91811d4b677bf0f558134c69015708c308ef7080df328f12b0b0d58ae6cdebe277c29b6d11c20cfeb0847a4934e3a8924323e57ed661d6e9f6656a34'
2024-03-03 22:13:19 +00:00
'cd443f12fe8bde8fd2b982a883d5f3bc5ff1333c53cee4dda93eceb13a123c58e702f61773a302fda5b695f62062b5d69aed6efc5847c731cecd480b3ffd8a2f'
2021-02-28 21:40:57 +00:00
'24c61581bb922f8065a6ea73164ca5d0b6c63ab4ca7c265660b2ec257b69ff9dd4b0349572ff20f54950961b4286c77da36c1d2778698c80943cfd6ed6531b10'
'a8b7d003f66ed5c5b1b60d57c05339af3dcdcf346eab52760810086e17f6936dd29ed7fd26281657bc86ac6721c989cbfbaa8e81f97111c807bcd06baece3bf2'
'82e03ea95995cfa78abc4d930bd0c250f22788d9ca4dc0921cfbb44a965c0f851cbcc7a855e36ec6e6aa5bf33fbd313b4fe68a2f1c4b7935c2b297be25895324'
2023-08-07 17:45:12 +00:00
'9759827f7619358383bf0e68c955522c0054620f742f5122a59888fadfc0bc20bd587eab7a77bc73e8ee4d20cf8f02625c07f241462e8ab9c08f5af509daaef3')
2014-07-16 03:06:18 +00:00
2015-02-28 14:15:08 +00:00
prepare() {
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
# fix default lua pkgconfig name
2021-05-15 18:39:10 +00:00
sed -e 's/lua5.1/lua51/' -i plugins/lua/uwsgiplugin.py
2021-02-28 21:40:57 +00:00
# move ruby plugin to new location and fix its name
mv plugins/ruby{19,}
2021-05-15 18:39:10 +00:00
sed -e 's/ruby19/ruby/' -i plugins/ruby/uwsgiplugin.py
2023-01-14 02:56:44 +00:00
# duplicate the php plugin, so that we can modify it
cp -av plugins/php{,_legacy}
2023-01-16 19:44:52 +00:00
# link the php_legacy plugin against libphp-legacy.so
sed -e 's/lphp/lphp-legacy/g; s/UWSGICONFIG_PHPPATH/UWSGICONFIG_PHP_LEGACY_PATH/g; s/NAME=.*/NAME="php_legacy"/g' -i plugins/php_legacy/uwsgiplugin.py
sed -e 's/php_plugin/php_legacy_plugin/g' -i plugins/php_legacy/php_plugin.c
2021-02-28 21:40:57 +00:00
# copy our custom build profile into place
cp -v ../archlinux.ini buildconf/
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() {
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2023-01-16 19:44:52 +00:00
export UWSGICONFIG_PHP_LEGACY_PATH='php-config-legacy'
2021-02-28 21:40:57 +00:00
python uwsgiconfig.py --verbose --build archlinux
2014-07-16 03:06:18 +00:00
}
package_uwsgi() {
2024-04-27 16:14:49 +00:00
depends=(
glibc
jansson
libcap libcap.so
libxcrypt libcrypt.so
libxml2
openssl
pam libpam.so
pcre2
systemd-libs libsystemd.so
util-linux-libs libuuid.so
zlib
)
2021-02-28 21:40:57 +00:00
backup=('etc/uwsgi/emperor.ini')
install=uwsgi.install
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 "${pkgbase}" -t "$pkgdir/usr/bin/"
install -vDm 644 ../uwsgi_at.service "$pkgdir"/usr/lib/systemd/system/uwsgi@.service
install -vDm 644 ../uwsgi_at.socket "$pkgdir"/usr/lib/systemd/system/uwsgi@.socket
install -vDm 644 ../emperor.uwsgi.service "$pkgdir"/usr/lib/systemd/system/emperor.uwsgi.service
install -vDm 644 ../emperor.uwsgi.socket "$pkgdir"/usr/lib/systemd/system/emperor.uwsgi.socket
install -vDm 644 ../emperor.ini -t "$pkgdir"/etc/uwsgi/
install -vDm 644 ../uwsgi.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/uwsgi.conf
install -vDm 644 ../uwsgi.logrotate "$pkgdir"/etc/logrotate.d/uwsgi
install -vDm 644 ../uwsgi.sysusers "$pkgdir"/usr/lib/sysusers.d/uwsgi.conf
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-07-16 03:06:18 +00:00
}
2014-12-10 19:45:49 +00:00
package_uwsgi-plugin-cgi() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (CGI plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 cgi_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-12-10 19:45:49 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-rack() {
2024-04-27 16:14:49 +00:00
depends=(
glibc
ruby
uwsgi
)
2021-02-28 21:40:57 +00:00
pkgdesc="Ruby rack plugin"
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 {rack,fiber,rbthreads}_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-psgi() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (Perl psgi plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
perl
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 psgi_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-python() {
2021-02-28 21:40:57 +00:00
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
pkgdesc+=" (Python plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
python
python-gevent
python-greenlet
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 {asyncio,gevent,greenlet,python}_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
install -vDm 644 uwsgidecorators.py -t "${pkgdir}${site_packages}"
python -m compileall "${pkgdir}${site_packages}"
python -O -m compileall "${pkgdir}${site_packages}"
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-lua51() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (LUA plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
lua51
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 lua_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-07-16 03:06:18 +00:00
}
2014-11-21 14:12:14 +00:00
package_uwsgi-plugin-php() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (PHP plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
php-embed
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 php_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2021-02-28 21:40:57 +00:00
}
2023-01-14 02:56:44 +00:00
package_uwsgi-plugin-php-legacy() {
pkgdesc+=" (PHP Legacy plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
php-legacy-embed
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2023-01-14 02:56:44 +00:00
install -vDm 755 php_legacy_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2014-07-16 03:06:18 +00:00
}
2015-02-28 14:15:08 +00:00
package_uwsgi-plugin-webdav() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (WebDav plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
libxml2
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 webdav_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2015-02-28 14:15:08 +00:00
}
2017-10-25 12:48:05 +00:00
package_uwsgi-plugin-zabbix() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (zabbix plugin)"
2024-04-27 16:14:49 +00:00
depends=(
glibc
uwsgi
)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 zabbix_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2017-10-25 12:48:05 +00:00
}
2018-07-17 23:38:56 +00:00
package_uwsgi-plugin-notfound() {
2021-02-28 21:40:57 +00:00
pkgdesc+=" (notfound plugin)"
2022-10-28 21:46:40 +00:00
depends=(uwsgi)
2021-02-28 21:40:57 +00:00
2022-10-28 21:46:40 +00:00
cd $pkgbase-$pkgver
2021-02-28 21:40:57 +00:00
install -vDm 755 notfound_plugin.so -t "$pkgdir"/usr/lib/uwsgi/
2023-10-16 12:55:06 +00:00
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
2018-07-17 23:38:56 +00:00
}