summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-05-22 19:04:25 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-05-22 19:04:25 +0000
commit392071a19cac86ba518389468a6664db2912be99 (patch)
tree9b31eba446932bb27d388c02f7a7959d40bcc7d5 /www-apache
parentia64 stable wrt #269889 (diff)
downloadgentoo-2-392071a19cac86ba518389468a6664db2912be99.tar.gz
gentoo-2-392071a19cac86ba518389468a6664db2912be99.tar.bz2
gentoo-2-392071a19cac86ba518389468a6664db2912be99.zip
Update to version 2.5.9; finally respect flags (if apxs allows to..), have a test function, simplify install.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'www-apache')
-rw-r--r--www-apache/mod_security/ChangeLog12
-rw-r--r--www-apache/mod_security/files/mod_security-2.5.9-broken-autotools.patch34
-rw-r--r--www-apache/mod_security/mod_security-2.5.9.ebuild92
3 files changed, 136 insertions, 2 deletions
diff --git a/www-apache/mod_security/ChangeLog b/www-apache/mod_security/ChangeLog
index 0852c39e6dc4..797d01bee3ba 100644
--- a/www-apache/mod_security/ChangeLog
+++ b/www-apache/mod_security/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for www-apache/mod_security
-# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.17 2009/01/01 14:20:13 hollow Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.18 2009/05/22 19:04:25 flameeyes Exp $
+
+*mod_security-2.5.9 (22 May 2009)
+
+ 22 May 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ +mod_security-2.5.9.ebuild,
+ +files/mod_security-2.5.9-broken-autotools.patch:
+ Update to version 2.5.9; finally respect flags (if apxs allows to..), have
+ a test function, simplify install.
*mod_security-2.5.7 (01 Jan 2009)
diff --git a/www-apache/mod_security/files/mod_security-2.5.9-broken-autotools.patch b/www-apache/mod_security/files/mod_security-2.5.9-broken-autotools.patch
new file mode 100644
index 000000000000..75cbb4600f60
--- /dev/null
+++ b/www-apache/mod_security/files/mod_security-2.5.9-broken-autotools.patch
@@ -0,0 +1,34 @@
+Index: modsecurity-apache_2.5.9/apache2/build/find_apr.m4
+===================================================================
+--- modsecurity-apache_2.5.9.orig/apache2/build/find_apr.m4
++++ modsecurity-apache_2.5.9/apache2/build/find_apr.m4
+@@ -24,9 +24,9 @@ AC_ARG_WITH(
+ AC_MSG_CHECKING([for libapr config script])
+
+ dnl # Determine if the script was specified and use it directly
+-if test ! -d "${withval}" -a -e "${withval}"; then
+- APR_CONFIG="`basename $withval`"
+- with_apr=`echo ${withval} | sed "s/\/\?${APR_CONFIG}\$//"`
++if test ! -d "${apr_path}" -a -e "${apr_path}"; then
++ APR_CONFIG="`basename $apr_path`"
++ with_apr=`echo ${apr_path} | sed "s/\/\?${APR_CONFIG}\$//"`
+ fi
+
+ dnl # Look for the config script
+Index: modsecurity-apache_2.5.9/apache2/build/find_apu.m4
+===================================================================
+--- modsecurity-apache_2.5.9.orig/apache2/build/find_apu.m4
++++ modsecurity-apache_2.5.9/apache2/build/find_apu.m4
+@@ -24,9 +24,9 @@ AC_ARG_WITH(
+ AC_MSG_CHECKING([for libapr-util config script])
+
+ dnl # Determine if the script was specified and use it directly
+-if test ! -d "${withval}" -a -e "${withval}"; then
+- APU_CONFIG="`basename $withval`"
+- with_apu=`echo ${withval} | sed "s/\/\?${APU_CONFIG}\$//"`
++if test ! -d "${apu_path}" -a -e "${apu_path}"; then
++ APU_CONFIG="`basename $apu_path`"
++ with_apu=`echo ${apu_path} | sed "s/\/\?${APU_CONFIG}\$//"`
+ fi
+
+ dnl # Look for the config script
diff --git a/www-apache/mod_security/mod_security-2.5.9.ebuild b/www-apache/mod_security/mod_security-2.5.9.ebuild
new file mode 100644
index 000000000000..c8d8b411e663
--- /dev/null
+++ b/www-apache/mod_security/mod_security-2.5.9.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/mod_security-2.5.9.ebuild,v 1.1 2009/05/22 19:04:25 flameeyes Exp $
+
+inherit apache-module autotools
+
+MY_P=${P/mod_security-/modsecurity-apache_}
+MY_P=${MY_P/_rc/-rc}
+
+DESCRIPTION="Web application firewall and Intrusion Detection System for Apache."
+HOMEPAGE="http://www.modsecurity.org/"
+SRC_URI="http://www.modsecurity.org/download/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
+IUSE="lua"
+
+DEPEND="dev-libs/libxml2
+ lua? ( >=dev-lang/lua-5.1 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
+APACHE2_MOD_CONF="2.1.2/99_mod_security"
+APACHE2_MOD_DEFINE="SECURITY"
+
+need_apache2
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"/apache2
+
+ epatch "${FILESDIR}"/${P}-broken-autotools.patch
+
+ eautoreconf
+}
+
+src_compile() {
+ cd apache2
+
+ econf --with-apxs="${APXS}" \
+ --without-curl \
+ $(use_with lua) \
+ || die "econf failed"
+
+ APXS_FLAGS=
+ for flag in ${CFLAGS}; do
+ APXS_FLAGS="${APXS_FLAGS} -Wc,${flag}"
+ done
+
+ # Yes we need to prefix it _twice_
+ for flag in ${LDFLAGS}; do
+ APXS_FLAGS="${APXS_FLAGS} -Wl,${flag}"
+ done
+
+ emake \
+ APXS_CFLAGS="${CFLAGS}" \
+ APXS_LDFLAGS="${LDFLAGS}" \
+ APXS_EXTRA_CFLAGS="${APXS_FLAGS}" \
+ || die "emake failed"
+}
+
+src_test() {
+ cd apache2
+ make test || die
+}
+
+src_install() {
+ apache-module_src_install
+
+ # install rules updater
+ newbin tools/rules-updater.pl modsec-rules-updater || die
+
+ # install documentation
+ dodoc CHANGES || die
+ newdoc rules/CHANGELOG CHANGES.crs || die
+ newdoc rules/README README.crs || die
+ dohtml -r doc/* || die
+
+ # Prepare the core ruleset
+ cd "${S}"/rules/
+
+ sed -i -e 's:logs/:/var/log/apache2/:g' *.conf || die
+
+ insinto ${APACHE_MODULES_CONFDIR}/mod_security/
+ for i in *.conf; do
+ newins ${i} ${i/modsecurity_crs_/} || die
+ done
+}