Add modsecurity

tags/nginx-1.12.2-20.beta7
Daniel Berteaud 6 years ago
parent 664abc0c49
commit cd5f497e8f
  1. 22
      nginx.spec

@ -3,6 +3,7 @@
%define lua_version 0.10.13
%define ndk_version 0.3.0
%define modsecurity_version 1.0.0
# gperftools exist only on selected arches
%ifnarch s390 s390x
@ -44,6 +45,7 @@ Source210: UPGRADE-NOTES-1.6-to-1.10
Source300: lua-nginx-module-%{lua_version}.tar.gz
Source301: ngx_devel_kit-%{ndk_version}.tar.gz
Source302: modsecurity-nginx-v%{modsecurity_version}.tar.gz
# removes -Werror in upstream build scripts. -Werror conflicts with
# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
@ -185,7 +187,7 @@ Requires: nginx-mod-ndk
Requires: nginx == %{?epoch:%{epoch}:}%{version}
%description mod-http-lua
nginx lua dynamic modules.
%{summary}.
%package mod-ndk
Summary: nginx ndk dynamic modules
@ -195,12 +197,25 @@ License: The BSD 3-Clause License
Requires: nginx == %{?epoch:%{epoch}:}%{version}
%description mod-ndk
nginx ndk dynamic modules.
%{summary}.
%package mod-http-modsecurity
Summary: nginx lua dynamic modules
URL: https://github.com/SpiderLabs/ModSecurity-nginx
Group: System Environment/Daemons
License: Apache License 2.0
BuildRequires: libmodsecurity-devel
Requires: libmodsecurity
Requires: nginx == %{?epoch:%{epoch}:}%{version}
%description mod-http-modsecurity
%{summary}.
%prep
%setup -q
%setup -q -T -D -a 300
%setup -q -T -D -a 301
%setup -q -T -D -a 302
%patch0 -p0
cp %{SOURCE200} .
@ -271,7 +286,8 @@ export DESTDIR=%{buildroot}
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \
--with-ld-opt="$RPM_LD_FLAGS -Wl,-E" \
--add-dynamic-module=lua-nginx-module-%{lua_version} \
--add-dynamic-module=ngx_devel_kit-%{ndk_version}
--add-dynamic-module=ngx_devel_kit-%{ndk_version} \
--add-module=modsecurity-nginx-%{modsecurity_version}
make %{?_smp_mflags}

Loading…
Cancel
Save