]>
Commit | Line | Data |
---|---|---|
607bab06 | 1 | %define mod_name security |
4121201e | 2 | %define apxs /usr/sbin/apxs |
607bab06 | 3 | Summary: Apache module: securing web applications |
15d0dbba | 4 | Summary(pl.UTF-8): Moduł do apache: ochrona aplikacji WWW |
607bab06 | 5 | Name: apache-mod_%{mod_name} |
2f82a7fe | 6 | Version: 2.7.3 |
8c29b745 | 7 | Release: 2 |
607bab06 | 8 | License: GPL v2 |
06c2a295 | 9 | Group: Networking/Daemons/HTTP |
2f82a7fe JR |
10 | Source0: http://www.modsecurity.org/tarball/%{version}//modsecurity-apache_%{version}.tar.gz |
11 | # Source0-md5: 4a220bf4b954ed1760462e5956f65b21 | |
a79c6ea0 | 12 | Source1: %{name}.conf |
82dc93e9 | 13 | URL: http://www.modsecurity.org/ |
607bab06 | 14 | BuildRequires: apache-devel |
acec898f | 15 | BuildRequires: autoconf |
16 | BuildRequires: libxml2-devel | |
17 | BuildRequires: pcre-devel | |
18 | BuildRequires: pkgconfig | |
a8932271 | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
7452357d | 20 | Requires: apache(modules-api) = %apache_modules_api |
4097ac0d | 21 | Requires: apache-mod_unique_id |
6daedeb1 | 22 | Suggests: apache-mod_headers |
2f82a7fe | 23 | Suggests: apache-mod_security_crs |
607bab06 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
69833a69 ER |
26 | %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
27 | %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
607bab06 | 28 | |
29 | %description | |
b3be7b74 | 30 | ModSecurity is an open source intrusion detection and prevention |
31 | engine for web applications. It operates embedded into the web server, | |
32 | acting as a powerful umbrella - shielding web applications from | |
33 | attacks. | |
607bab06 | 34 | |
b98265f6 | 35 | %description -l pl.UTF-8 |
b3be7b74 | 36 | ModSecurity jest otwartym silnikiem wykrywania i zapobiegania intruzom |
b98265f6 JR |
37 | dla aplikacji WWW. Operuje w ramach serwera WWW, działając jak potężny |
38 | parasol chroniący aplikacje WWW przed atakami. | |
607bab06 | 39 | |
6656cb64 JR |
40 | %package -n mlogc |
41 | Summary: ModSecurity Audit Log Collector | |
42 | Group: Networking/Daemons/HTTP | |
43 | Requires: %{name} = %{version} | |
44 | ||
45 | %description -n mlogc | |
46 | This package contains the ModSecurity Audit Log Collector. | |
47 | ||
607bab06 | 48 | %prep |
0252200a | 49 | %setup -q -n modsecurity-apache_%{version} |
607bab06 | 50 | |
51 | %build | |
48ebeebf AG |
52 | %configure |
53 | %{__make} \ | |
69833a69 ER |
54 | CC="%{__cc}" \ |
55 | CFLAGS="%{optflags}" \ | |
56 | top_dir="%{apachelibdir}" | |
607bab06 | 57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
8c29b745 JR |
60 | install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}/modsecurity.d} \ |
61 | $RPM_BUILD_ROOT{/var/log/mlogc/data,%{_bindir},%{_sysconfdir}} \ | |
62 | $RPM_BUILD_ROOT/var/lib/%{name} | |
607bab06 | 63 | |
69833a69 ER |
64 | install apache2/.libs/mod_%{mod_name}2.so $RPM_BUILD_ROOT%{apachelibdir} |
65 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/90_mod_%{mod_name}.conf | |
66 | ||
2f82a7fe | 67 | cp -a modsecurity.conf-recommended $RPM_BUILD_ROOT%{apacheconfdir}/modsecurity.d |
4097ac0d | 68 | echo '# Drop your local rules in here.' > $RPM_BUILD_ROOT%{apacheconfdir}/modsecurity.d/modsecurity_localrules.conf |
607bab06 | 69 | |
6656cb64 JR |
70 | install mlogc/mlogc $RPM_BUILD_ROOT%{_bindir} |
71 | install mlogc/mlogc-batch-load.pl $RPM_BUILD_ROOT%{_bindir}/mlogc-batch-load | |
72 | install mlogc/mlogc-default.conf $RPM_BUILD_ROOT%{_sysconfdir}/mlogc.conf | |
73 | ||
607bab06 | 74 | %clean |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %post | |
a8932271 | 78 | %service -q httpd restart |
607bab06 | 79 | |
fb84a28b | 80 | %postun |
607bab06 | 81 | if [ "$1" = "0" ]; then |
a8932271 | 82 | %service -q httpd restart |
607bab06 | 83 | fi |
84 | ||
85 | %files | |
86 | %defattr(644,root,root,755) | |
2f82a7fe | 87 | %doc CHANGES README.* modsecurity* doc/* tools |
69833a69 ER |
88 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_%{mod_name}.conf |
89 | %dir %{apacheconfdir}/modsecurity.d | |
6daedeb1 | 90 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/modsecurity.d/*.* |
69833a69 | 91 | %attr(755,root,root) %{apachelibdir}/*.so |
8c29b745 | 92 | %attr(770,http,root) %dir /var/lib/%{name} |
6656cb64 JR |
93 | |
94 | %files -n mlogc | |
95 | %defattr(644,root,root,755) | |
96 | %doc mlogc/INSTALL | |
97 | %attr(0640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mlogc.conf | |
98 | %attr(0755,root,root) %{_bindir}/mlogc | |
99 | %attr(0755,root,root) %{_bindir}/mlogc-batch-load | |
100 | %attr(0755,root,root) %dir /var/log/mlogc | |
101 | %attr(0770,root,http) %dir /var/log/mlogc/data |