# # spec file for package apache2-mod_security2 # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: apache2-mod_security2 Version: 2.6.7 Release: 0 %define aversion 2.6.7 # # BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: apache2-devel BuildRequires: apache2-prefork BuildRequires: c++_compiler BuildRequires: curl-devel BuildRequires: libxml2-devel BuildRequires: pcre-devel %define apache apache2 %define modname mod_security2 %define tarballname modsecurity-apache_%{aversion} # %{!?apxs: %global apxs /usr/sbin/apxs2} %{!?apache_libexecdir: %global apache_libexecdir %(%{apxs} -q LIBEXECDIR)} %{!?apache_sysconfdir: %global apache_sysconfdir %(%{apxs} -q SYSCONFDIR)} %{!?apache_includedir: %global apache_includedir %(%{apxs} -q INCLUDEDIR)} %{!?apache_serveroot: %global apache_serverroot %(%{apxs} -q PREFIX)} %{!?apache_localstatedir: %global apache_localstatedir %(%{apxs} -q LOCALSTATEDIR)} %{!?apache_mmn: %global apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN)} Requires: %{apache_mmn} Requires: apache2 # Url: http://www.modsecurity.org/ Source: http://www.modsecurity.org/download/%{tarballname}.tar.gz Source1: mod_security2.conf Source2: rules.tar.bz2 # Summary: ModSecurity Open Source Web Application Firewall License: Apache-2.0 and GPL-2.0 Group: Productivity/Networking/Web/Servers %description ModSecurity(TM) is an open source intrusion detection and prevention engine for web applications (or a web application firewall). Operating as an Apache Web server module or standalone, the purpose of ModSecurity is to increase web application security, protecting web applications from known and unknown attacks. %prep %setup -n %{tarballname} tar -xvjpf %{S:2} %build #pushd %{apache} ./configure make %{?_smp_mflags} # make -C mlogc-src/ #popd %install pushd %{apache} install -D -m 0755 .libs/mod_security2.so %{buildroot}%{apache_libexecdir}/%{modname}.so popd install -D -m 0755 mlogc/mlogc %{buildroot}%{_sbindir}/mlogc install -D -m 0755 mlogc/mlogc-batch-load.pl %{buildroot}%{_sbindir}/mlogc-batch-load.pl install -D -m 0640 mlogc/mlogc-default.conf %{buildroot}%{_sysconfdir}/mlogc.conf cp mlogc/INSTALL mlogc/INSTALL.mlogc install -D -m 0644 %{SOURCE1} %{buildroot}%{apache_sysconfdir}/conf.d/%{modname}.conf mkdir examples cp -a tools examples rm -f examples/tools/M* chmod 644 examples/tools/* %files %defattr(-, root, root, 0755) %{apache_libexecdir}/%{modname}.so %config(noreplace) %{apache_sysconfdir}/conf.d/%{modname}.conf %doc doc/Reference_Manual.html %doc README.TXT CHANGES LICENSE modsecurity.conf-recommended %doc mlogc/INSTALL.mlogc mlogc/mlogc-default.conf %doc examples/ %doc rules/ %{_sbindir}/mlogc %{_sbindir}/mlogc-batch-load.pl %config(noreplace) %{_sysconfdir}/mlogc.conf %changelog