From a85fed14c331cb0569d45b84ce913d587c4953ad Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 30 Apr 2018 19:25:15 +0200 Subject: [PATCH] Add nginx-mod-substitutions-filter * See https://github.com/Martchus/PKGBUILDs/issues/64 * Not tested yet --- .../default/PKGBUILD | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 nginx-mod-substitutions-filter/default/PKGBUILD diff --git a/nginx-mod-substitutions-filter/default/PKGBUILD b/nginx-mod-substitutions-filter/default/PKGBUILD new file mode 100644 index 00000000..b3518d05 --- /dev/null +++ b/nginx-mod-substitutions-filter/default/PKGBUILD @@ -0,0 +1,49 @@ +# $Id$ +# Maintainer: Martchus + +pkgname=nginx-mod-substitutions-filter +pkgver=0.6.4.108.bc58cb1 +pkgrel=1 +_dirname="$pkgname" +_nginxver=1.14.0 + +pkgdesc='NGINX filter module which can do both regular expression and fixed string substitutions' +arch=('x86_64') +depends=("nginx=$_nginxver" "libutil-linux") +makedepends=('git') +url='https://github.com/yaoweibin/ngx_http_substitutions_filter_module' +license=('BSD') + +source=( + https://nginx.org/download/nginx-$_nginxver.tar.gz{,.asc} + "$pkgname::git+https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git#commit=${pkgver##*.}" +) +validpgpkeys=(B0F4253373F8F6F510D42178520A9993A1C052F8) # Maxim Dounin +sha256sums=('5d15becbf69aba1fe33f8d416d97edd95ea8919ea9ac519eff9bafebb6022cb5' + 'SKIP' + 'SKIP') + +prepare() { + cd "$srcdir/$_dirname" + echo ' + if [ "$ngx_module_link" = DYNAMIC ] ; then + ngx_module_type=HTTP + ngx_module_name=ngx_http_subs_filter_module + ngx_module_srcs="$ngx_addon_dir/ngx_http_subs_filter_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/README" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" # license is part of the README + cd "$srcdir"/nginx-$_nginxver/objs + for mod in ngx_*.so; do + install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod + done +}