PKGBUILDs/nginx-mod-cache-purge/default/PKGBUILD

49 lines
1.4 KiB
Bash

# $Id$
# Maintainer: Martchus <martchus@gmx.net>
pkgname=nginx-mod-cache-purge
pkgver=2.3
pkgrel=5
_dirname="ngx_cache_purge-${pkgver}"
_nginxver=1.16.1
pkgdesc='NGINX module that adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches'
arch=('x86_64')
depends=("nginx=$_nginxver" "libutil-linux")
url='http://labs.frickle.com/nginx_ngx_cache_purge'
license=('CUSTOM')
source=(
https://nginx.org/download/nginx-$_nginxver.tar.gz{,.asc}
"$pkgname-$pkgver::http://labs.frickle.com/files/${_dirname}.tar.gz"
)
validpgpkeys=(B0F4253373F8F6F510D42178520A9993A1C052F8) # Maxim Dounin <mdounin@mdounin.ru>
sha256sums=('f11c2a6dd1d3515736f0324857957db2de98be862461b5a542a3ac6188dbe32b'
'SKIP'
'279e0d8a46d3b1521fd43b3f78bc1c08b263899142a7cc5058c1c0361a92c89c')
prepare() {
cd "$srcdir/$_dirname"
echo '
if [ "$ngx_module_link" = DYNAMIC ] ; then
ngx_module_type=HTTP
ngx_module_name=ngx_http_cache_purge_module
ngx_module_srcs="$ngx_addon_dir/ngx_cache_purge_module.c"
. auto/module
fi' >> config
}
build() {
cd "$srcdir"/nginx-$_nginxver
./configure --with-compat --add-dynamic-module="../$_dirname"
make modules
}
package() {
install -Dm755 "$srcdir/$_dirname/LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
cd "$srcdir"/nginx-$_nginxver/objs
for mod in ngx_*.so; do
install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
done
}