1 %define apxs /usr/sbin/apxs
2 Summary: OWASP ModSecurity Core Rule Set (CRS)
3 Name: apache-mod_security_crs
7 Group: Networking/Daemons/HTTP
8 # Use the following command to generate the tarball:
9 # wget https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/%{version}
10 #Source0: %{name}-%{version}.tar.gz
11 # Source0-md5: 4a220bf4b954ed1760462e5956f65b21
12 URL: http://www.modsecurity.org/
13 BuildRequires: apache-devel
14 BuildRequires: rpmbuild(macros) >= 1.268
15 Requires: apache-mod_security >= 2.7.0
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
22 OWASP ModSecurity Core Rule Set provides generic protection from
23 unknown vulnerabilities often found in web applications, which are
24 in most cases custom coded. The Core Rules are heavily commented to
25 allow it to be used as a step-by-step deployment guide
29 %setup -q -n modsecurity-apache_%{version}
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}}
37 install -d $RPM_BUILD_ROOT%{apacheconfdir}/modsecurity.d/blocking
40 rm -rf $RPM_BUILD_ROOT
43 %defattr(644,root,root,755)
44 %doc CHANGES README.* modsecurity* doc/* tools
45 %dir %{apacheconfdir}/modsecurity.d
46 %dir %{apacheconfdir}/modsecurity.d/blocking
47 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/modsecurity.d/*.*