# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Intrusion Detection System for apache" HOMEPAGE="http://www.modsecurity.org" SRC_URI="http://www.modsecurity.org/download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~ppc" IUSE="apache2 doc" RDEPEND="net-www/apache2? ( =net-www/apache-2* ) !apache2? ( =net-www/apache-1* )" src_compile() { use apache2 || apxs -S LIBEXECDIR=${S} -ci ${S}/apache1/mod_security.c use apache2 && apxs2 -S LIBEXECDIR=${S} -ci ${S}/apache2/mod_security.c } src_install() { use apache2 || exeinto /usr/lib/apache-extramodules/ use apache2 && exeinto /usr/lib/apache2-extramodules/ doexe ${S}/mod_security.so dodoc CHANGES INSTALL LICENSE README httpd.conf.example-minimal use doc && dodoc modsecurity-manual-1.8.3.pdf if use apache2; then einfo "Installing a Apache2 config for mod_security (99_mod_security.conf)" insinto /etc/apache2/conf/modules.d doins ${FILESDIR}/99_mod_security.conf else einfo "Installing a Apache config for mod_security (mod_security.conf)" insinto /etc/apache/conf/addon-modules doins ${FILESDIR}/mod_security.conf fi }