Commit e85e79aa authored by J0WI's avatar J0WI Committed by Jakub Jirutka

main/nginx: add module http-naxsi

MR !7069
parent 72c2606c
......@@ -96,14 +96,14 @@ done
# For simplicity we assume that module is hosted on GitHub.
_add_module() {
local name="$1" ver="$2" url="$3"
local dirname="${url##*/}-${ver#v}"
local name="$1" ver="$2" url="$3" subdir="$4"
local dirname=${url##*/}-${ver#v}
# Don't add new flag and source if it's already there, i.e. two or more
# modules share the same source (e.g. geoip2 that provides http-geoip2
# and stream-geoip2).
if ! printf '%s\n' $_extra_flags | grep -qFw "$srcdir/$dirname"; then
_extra_flags="$_extra_flags --add-dynamic-module=$srcdir/$dirname"
_extra_flags="$_extra_flags --add-dynamic-module=$srcdir/$dirname/$subdir"
source="$source $dirname.tar.gz::$url/archive/$ver.tar.gz"
fi
subpackages="$subpackages $pkgname-mod-$name:_module"
......@@ -158,6 +158,8 @@ _add_module "http-geoip2" "3.3" "https://github.com/leev/ngx_http_geoip2_module"
_add_module "stream-geoip2" "3.3" "https://github.com/leev/ngx_http_geoip2_module"
_stream_geoip2_depends="$pkgname-mod-stream"
_add_module "http-naxsi" "0.56" "https://github.com/nbs-system/naxsi" "naxsi_src"
prepare() {
local file; for file in $source; do
case $file in
......@@ -347,7 +349,13 @@ _module() {
done
case "$name" in
http_perl) mv "$pkgdir"/usr/lib/perl5 "$subpkgdir"/usr/lib/;;
http_perl)
mv "$pkgdir"/usr/lib/perl5 "$subpkgdir"/usr/lib/
;;
http_naxsi)
install -m644 -D "$srcdir"/naxsi-*/naxsi_config/naxsi_core.rules \
./etc/nginx/naxsi_core.rules
;;
esac
}
......@@ -376,4 +384,5 @@ c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7
8adb7453c27748f4e685e3352e9b318b408da818754dc5b6244e908423941a8ba337561104f6e481f2553cbc0e334dcea73b57f8e810a9d6e974bb69ff8859e5 nginx-upstream-fair-0.1.3.tar.gz
4a0af5e9afa4deb0b53de8de7ddb2cfa6430d372e1ef9e421f01b509548bd134d427345442ac1ce667338cc2a1484dc2ab732e316e878ac7d3537dc527d5f922 nginx-rtmp-module-1.2.1.tar.gz
11a97ffa28d6078aa57ad1821421928f6e2a05235a2f384cd2b498e7998f1025edc1ee163a900937ee251b49bd9381813e71248e67d537531b91a998b1610c56 nginx-vod-module-1.25.tar.gz
06963b598c54e22d75ce837fb222f5aa6c9494c29e558ff46f1205d7159fc305414bfac4ed3288c836dcbf7628d92f26458e1992d34fc2f4b73275a32847bdc0 ngx_http_geoip2_module-3.3.tar.gz"
06963b598c54e22d75ce837fb222f5aa6c9494c29e558ff46f1205d7159fc305414bfac4ed3288c836dcbf7628d92f26458e1992d34fc2f4b73275a32847bdc0 ngx_http_geoip2_module-3.3.tar.gz
4660751849bce303af6010b7257532404710106a94817e78d4bc4b566f8019620f24f30207f1d4366b88132a5124e34b164dc67ed80b6710f4bad66115564cbd naxsi-0.56.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment