aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2015-04-03 01:31:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-04-22 16:24:51 +0000
commit92b5bfa243aafa1b1ee3a85f3cb77826c2280ba7 (patch)
tree8c0ff69cd38d8a77eee4a7d47a58ccc6f2838f02
parentab910b003cfbb4a5a58a625e0322cf478a27a328 (diff)
downloadaports-92b5bfa243aafa1b1ee3a85f3cb77826c2280ba7.tar.bz2
aports-92b5bfa243aafa1b1ee3a85f3cb77826c2280ba7.tar.xz
testing/nxapi: new aport
log tools for nginx-naxsi (replaces naxsi-utils)
-rw-r--r--testing/nxapi/APKBUILD47
-rw-r--r--testing/nxapi/fix-config-location.patch26
2 files changed, 73 insertions, 0 deletions
diff --git a/testing/nxapi/APKBUILD b/testing/nxapi/APKBUILD
new file mode 100644
index 0000000000..c399ba13eb
--- /dev/null
+++ b/testing/nxapi/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
+# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
+pkgname=nxapi
+_pkgname=naxsi
+pkgver=0.54_rc1
+_ver=${pkgver/_/}
+pkgrel=0
+pkgdesc="nginx/naxsi log parser, whitelist and report generator."
+url="http://www.nginx.org | https://github.com/nbs-system/naxsi"
+arch="noarch"
+license="GPL v2"
+depends="python"
+depends_dev=""
+makedepends="python-dev"
+#subpackages="$pkgname-doc"
+source="$_pkgname-$_ver.tar.gz::https://github.com/nbs-system/naxsi/archive/${_ver}.tar.gz
+ fix-config-location.patch
+ "
+
+_builddir="$srcdir"/$_pkgname-$_ver/nxapi
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="c1b449903786317ffa7096c1a594a3ff naxsi-0.54rc1.tar.gz
+1ad187c532b7314e6db3a18dcb0e56bc fix-config-location.patch"
+sha256sums="b931600d6f97073f88cf09a4a1a304158679d27fe6f762f58331253a243bcf8f naxsi-0.54rc1.tar.gz
+abc80d64fa48babcb99272fc7a0b15bfe887370e9f0021e64104c83c9e4ff448 fix-config-location.patch"
+sha512sums="411cde7dd52d7728c2fe0ff5d62ec7306fcd2dc4687f2c894f5ddd32e691b8609f2b4b468308d9a8ba79bc214515459c86d096b7dff27573248beb6ba6794082 naxsi-0.54rc1.tar.gz
+b2b62df3d50f03180c8720cb0008039bec45ac08d416617bb53631242b32f7d831016e6381a5b4735f5a00c4196366888123214a776470e47e1fe8c22adf45b8 fix-config-location.patch"
diff --git a/testing/nxapi/fix-config-location.patch b/testing/nxapi/fix-config-location.patch
new file mode 100644
index 0000000000..31ad21afdb
--- /dev/null
+++ b/testing/nxapi/fix-config-location.patch
@@ -0,0 +1,26 @@
+--- nxapi/setup.py
++++ nxapi/setup.py.new
+@@ -6,18 +6,18 @@
+ import pprint
+
+ f = {}
+-data_files = [('/usr/local/nxapi/', ['nx_datas/country2coords.txt']),
+- ('/usr/local/etc/', ['nxapi.json'])]
++data_files = [('/etc/nginx/nxapi/', ['nx_datas/country2coords.txt']),
++ ('/etc/nginx/nxapi/', ['nxapi.json'])]
+ #modules = []
+ for dirname, dirnames, filenames in os.walk('tpl/'):
+ for filename in filenames:
+ if filename.endswith(".tpl"):
+ print dirname+"#"+filename
+- if "/usr/local/nxapi/"+dirname not in f.keys():
++ if "/etc/nginx/nxapi/"+dirname not in f.keys():
+
+- f["/usr/local/nxapi/"+dirname] = []
++ f["/etc/nginx/nxapi/"+dirname] = []
+
+- f["/usr/local/nxapi/"+dirname].append(os.path.join(dirname, filename))
++ f["/etc/nginx/nxapi/"+dirname].append(os.path.join(dirname, filename))
+
+ for z in f.keys():
+ data_files.append( (z, f[z]))