# $Id: Portfile,v 1.1 2004/04/12 12:41:18 mww Exp $
PortSystem 1.0
name		mod_dosevasive
version		1.8
categories	www
platforms	darwin 
maintainers	julien.touche@touche.fr.st
description	apache module against DDoS
long_description	mod_dosevasive is an evasive maneuvers module for \
			Apache to provide evasive action in the event of an \
			HTTP DoS or DDoS attack or brute force attack. It is \
			also designed to be a detection and network management \
			tool, and can be easily configured to talk to \
			ipchains, firewalls, routers, and etcetera. \
			mod_dosevasive presently reports abuses via email and \
			syslog facilities. 

homepage	http://www.nuclearelephant.com/projects/dosevasive/
master_sites	${homepage}
distname	${name}.${version}
checksums	md5 243d24e205c3b82ef55542887e03d998

set worksrcdir	${name}

use_configure	no

#variant apache1	{
	depends_lib	path:${prefix}/etc/apache:apache
	build.cmd	${prefix}/sbin/apxs
	set apache	apache
#}

variant apache2 {
	depends_lib	path:${prefix}/etc/apache2:apache2
	build.cmd	${prefix}/sbin/apxs
	set apache	apache2
}

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

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