summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/modsecurity/PKGBUILD57
-rw-r--r--pcr/modsecurity/fix_lua_detection.patch12
2 files changed, 69 insertions, 0 deletions
diff --git a/pcr/modsecurity/PKGBUILD b/pcr/modsecurity/PKGBUILD
new file mode 100644
index 000000000..0fa10982c
--- /dev/null
+++ b/pcr/modsecurity/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: David P. <megver83@parabola.nu>
+# Contributor: Alfredo Ramos <alfredo dot ramos at yandex dot com>
+# Contributor: Stephan Conrad <stephan@conrad.pics>
+
+pkgname=modsecurity
+pkgver=2.9.2
+pkgrel=2
+pkgdesc='A cross platform web application firewall engine for Apache, IIS and Nginx'
+arch=('armv7h' 'i686' 'x86_64')
+url='https://modsecurity.org/'
+license=('APACHE')
+depends=('apache' 'apr-util' 'pcre' 'libxml2' 'lua' 'curl' 'yajl')
+provides=("${pkgname}=${pkgver}")
+source=("https://github.com/SpiderLabs/ModSecurity/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc}
+ 'fix_lua_detection.patch')
+validpgpkeys=('190EFACCA1E9FA466A8ECD9CE6DFB08CE8B11277' # Felipe Zimmerle
+)
+sha256sums=(
+ '41a8f73476ec891f3a9e8736b98b64ea5c2105f1ce15ea57a1f05b4bf2ffaeb5'
+ 'SKIP' # GPG signature
+ 'cf9d149d3c2a0e8e7960d55fc86789168df64c4511200551b67c457a87752934'
+)
+
+prepare() {
+ # Create build directory
+ mkdir -p "${srcdir}"/build
+
+ cd "${srcdir}"/build
+ cp -a "${srcdir}"/${pkgname}-${pkgver}/* ./
+
+ # Fix LUA detection
+ patch -Np1 < ../fix_lua_detection.patch
+
+ ./autogen.sh
+}
+
+build() {
+ # Build package
+ cd "${srcdir}"/build
+
+ ./configure \
+ --prefix=/usr \
+ --enable-standalone-module \
+ --enable-htaccess-config
+
+ # Remove RPATH
+ # https://tracker.debian.org/media/packages/m/modsecurity-apache/rules-2.9.1-2
+ sed -ri 's|(hardcode_into_libs)=.*|\1=no|' libtool
+
+ make
+}
+
+package() {
+ # Install package
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/pcr/modsecurity/fix_lua_detection.patch b/pcr/modsecurity/fix_lua_detection.patch
new file mode 100644
index 000000000..141165170
--- /dev/null
+++ b/pcr/modsecurity/fix_lua_detection.patch
@@ -0,0 +1,12 @@
+diff -uprNEBZ --suppress-blank-empty a/build/find_lua.m4 b/build/find_lua.m4
+--- a/build/find_lua.m4 2017-07-18 13:45:57.000000000 -0500
++++ b/build/find_lua.m4 2017-07-22 18:07:59.534421087 -0500
+@@ -16,7 +16,7 @@ LUA_CPPFLAGS=""
+ LUA_LDADD=""
+ LUA_LDFLAGS=""
+ LUA_CONFIG=${PKG_CONFIG}
+-LUA_PKGNAMES="lua5.1 lua-5.1 lua_5.1 lua-51 lua_51 lua51 lua5 lua lua5.2 lua-5.2 lua_5.2 lua-52 lua_52 lua52 lua5.3 lua-5.3 lua_5.3 lua-53 lua_53 lua53 "
++LUA_PKGNAMES="lua53 lua_53 lua-53 lua_5.3 lua-5.3 lua5.3 lua52 lua_52 lua-52 lua_5.2 lua-5.2 lua5.2 lua lua5 lua51 lua_51 lua-51 lua_5.1 lua-5.1 lua5.1"
+ LUA_SONAMES="so la sl dll dylib a"
+
+ AC_ARG_WITH(