summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-02 13:25:17 +0200
committerErich Eckner <git@eckner.net>2018-05-02 13:25:17 +0200
commit5e1854781fc45640ebe9966cc9353aa9e13a8515 (patch)
tree72b9f142b1aa67ded7a3fd8a229215800f08cc1a
parent598e3818c2e9618b1249cde55d648e2a0ac435e2 (diff)
downloadarchlinuxewe.git.save-5e1854781fc45640ebe9966cc9353aa9e13a8515.tar.xz
nginx-mod-ipscrub-git new
-rw-r--r--nginx-mod-ipscrub-git/.gitignore1
-rw-r--r--nginx-mod-ipscrub-git/PKGBUILD58
2 files changed, 59 insertions, 0 deletions
diff --git a/nginx-mod-ipscrub-git/.gitignore b/nginx-mod-ipscrub-git/.gitignore
new file mode 100644
index 00000000..8ccd8f63
--- /dev/null
+++ b/nginx-mod-ipscrub-git/.gitignore
@@ -0,0 +1 @@
+ipscrub
diff --git a/nginx-mod-ipscrub-git/PKGBUILD b/nginx-mod-ipscrub-git/PKGBUILD
new file mode 100644
index 00000000..9a57513a
--- /dev/null
+++ b/nginx-mod-ipscrub-git/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+
+_nginxver=1.14.0
+
+pkgname=nginx-mod-ipscrub-git
+pkgver=0.r9.99230f6
+pkgrel=1
+pkgdesc='IP address anonymizer for nginx log files'
+
+arch=('i686' 'x86_64')
+depends=("nginx=$_nginxver")
+url='https://github.com/masonicboom/ipscrub'
+license=('custom')
+
+source=(
+ https://nginx.org/download/nginx-$_nginxver.tar.gz{,.asc}
+ ipscrub::git+https://github.com/masonicboom/ipscrub.git#commit=${pkgver##*.}
+)
+validpgpkeys=(B0F4253373F8F6F510D42178520A9993A1C052F8) # Maxim Dounin <mdounin@mdounin.ru>
+sha256sums=(
+ '5d15becbf69aba1fe33f8d416d97edd95ea8919ea9ac519eff9bafebb6022cb5'
+ 'SKIP'
+ 'SKIP'
+)
+
+pkgver() {
+
+ git -C "${srcdir}/ipscrub" fetch >/dev/null 2>&1
+
+ _commit=$(
+ git -C "${srcdir}/ipscrub" rev-parse --short HEAD
+ )
+
+ printf '%s.r%s.%s\n' \
+ "${pkgver%%.*}" \
+ "$(
+ git -C "${srcdir}/ipscrub" rev-list --count "${_commit}"
+ )" \
+ "${_commit}"
+
+}
+
+build() {
+ cd "$srcdir"/nginx-$_nginxver
+ ./configure --with-compat \
+ --add-dynamic-module=../ipscrub/ipscrub
+ make modules
+}
+
+package() {
+
+ cd "$srcdir/nginx-$_nginxver/objs"
+ install -Dm755 -t "$pkgdir/usr/lib/nginx/modules/" *.so
+
+ sed -n '/## License$/,/###/ { /##/! p }' "$srcdir/ipscrub/README.md" | \
+ install -Dm644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+}