2008-09-24 15:02:28 +02:00
|
|
|
#
|
2012-08-27 15:45:37 +02:00
|
|
|
# spec file for package apache2-mod_security2
|
2008-09-24 15:02:28 +02:00
|
|
|
#
|
2012-08-27 15:45:37 +02:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-09-24 15:02:28 +02:00
|
|
|
#
|
|
|
|
# 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
|
2012-08-27 15:45:37 +02:00
|
|
|
Version: 2.6.7
|
|
|
|
Release: 0
|
|
|
|
%define aversion 2.6.7
|
2008-09-24 15:02:28 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-08-27 15:45:37 +02:00
|
|
|
BuildRequires: apache2-devel
|
|
|
|
BuildRequires: apache2-prefork
|
|
|
|
BuildRequires: c++_compiler
|
|
|
|
BuildRequires: curl-devel
|
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: pcre-devel
|
2008-09-24 15:02:28 +02:00
|
|
|
%define apache apache2
|
|
|
|
%define modname mod_security2
|
2012-08-27 15:45:37 +02:00
|
|
|
%define tarballname modsecurity-apache_%{aversion}
|
2008-09-24 15:02:28 +02:00
|
|
|
#
|
2012-08-27 15:45:37 +02:00
|
|
|
|
|
|
|
%{!?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
|
2008-09-24 15:02:28 +02:00
|
|
|
#
|
|
|
|
Url: http://www.modsecurity.org/
|
|
|
|
Source: http://www.modsecurity.org/download/%{tarballname}.tar.gz
|
2009-01-23 23:43:58 +01:00
|
|
|
Source1: mod_security2.conf
|
2012-08-27 15:45:37 +02:00
|
|
|
Source2: rules.tar.bz2
|
2008-09-24 15:02:28 +02:00
|
|
|
#
|
|
|
|
Summary: ModSecurity Open Source Web Application Firewall
|
2012-08-27 15:45:37 +02:00
|
|
|
License: Apache-2.0 and GPL-2.0
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
2008-09-24 15:02:28 +02:00
|
|
|
|
|
|
|
%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}
|
2012-08-27 15:45:37 +02:00
|
|
|
tar -xvjpf %{S:2}
|
2008-09-24 15:02:28 +02:00
|
|
|
|
|
|
|
%build
|
2012-08-27 15:45:37 +02:00
|
|
|
#pushd %{apache}
|
2009-05-19 02:53:20 +02:00
|
|
|
./configure
|
2012-08-27 15:45:37 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
# make -C mlogc-src/
|
|
|
|
#popd
|
2008-09-24 15:02:28 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
pushd %{apache}
|
2009-05-19 02:53:20 +02:00
|
|
|
install -D -m 0755 .libs/mod_security2.so %{buildroot}%{apache_libexecdir}/%{modname}.so
|
2008-09-24 15:02:28 +02:00
|
|
|
popd
|
2012-08-27 15:45:37 +02:00
|
|
|
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
|
2009-01-23 23:43:58 +01:00
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{apache_sysconfdir}/conf.d/%{modname}.conf
|
2012-08-27 15:45:37 +02:00
|
|
|
mkdir examples
|
|
|
|
cp -a tools examples
|
|
|
|
rm -f examples/tools/M*
|
|
|
|
chmod 644 examples/tools/*
|
2008-09-24 15:02:28 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root, 0755)
|
|
|
|
%{apache_libexecdir}/%{modname}.so
|
|
|
|
%config(noreplace) %{apache_sysconfdir}/conf.d/%{modname}.conf
|
2012-08-27 15:45:37 +02:00
|
|
|
%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/
|
2009-05-19 02:53:20 +02:00
|
|
|
%{_sbindir}/mlogc
|
|
|
|
%{_sbindir}/mlogc-batch-load.pl
|
|
|
|
%config(noreplace) %{_sysconfdir}/mlogc.conf
|
2008-09-24 15:02:28 +02:00
|
|
|
|
|
|
|
%changelog
|