# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $
PortSystem 1.0
name		mod_security
version		1.8.6
categories	www security
maintainers	touche.fr.st:julien.touche
description	intrusion detection and prevention engine for web applications
long_description	ModSecurity is an open source intrusion detection and \
			prevention engine for web applications. It operates \
			embedded into the web server, acting as a powerful \
			umbrella - shielding applications from attacks. \
			It supports both branches of the Apache web server.
homepage	http://www.modsecurity.org
master_sites	${homepage}/download/
platforms	darwin 
checksums	md5 f6bf4724dd0db3d37586b64bc0ee160d

use_configure	no

#variant apache1 {
	depends_lib port:apache
	build.cmd	${prefix}/sbin/apxs
	set apachedir	apache
	set apachever	apache1
#}

#variant apache2	{
#	depends_lib	port:apache2
#	build.cmd	${prefix}/apache2/bin/apxs
#	set apachedir	apache2
#	set apachever	apache2
#}

build.args	-c -o ${name}.so ${apachever}/${name}.c
build.target

destroot {
	xinstall -d -m 755 ${destroot}${prefix}/libexec/${apachedir} \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 755 ${worksrcpath}/${name}.so \
		${destroot}${prefix}/libexec/${apachedir}/
	xinstall -m 644 -W ${worksrcpath} CHANGES INSTALL LICENSE README \
		${destroot}${prefix}/share/doc/${name}
}
