[92270] trunk/dports/www

jmr at macports.org jmr at macports.org
Mon Apr 23 09:05:22 PDT 2012


Revision: 92270
          https://trac.macports.org/changeset/92270
Author:   jmr at macports.org
Date:     2012-04-23 09:05:21 -0700 (Mon, 23 Apr 2012)
Log Message:
-----------
mod_dosevasive: rename to mod_evasive, update to 1.10.1 (#29814, #29815)

Modified Paths:
--------------
    trunk/dports/www/mod_dosevasive/Portfile
    trunk/dports/www/mod_evasive/Portfile

Added Paths:
-----------
    trunk/dports/www/mod_evasive/

Modified: trunk/dports/www/mod_dosevasive/Portfile
===================================================================
--- trunk/dports/www/mod_dosevasive/Portfile	2012-04-23 15:40:56 UTC (rev 92269)
+++ trunk/dports/www/mod_dosevasive/Portfile	2012-04-23 16:05:21 UTC (rev 92270)
@@ -1,10 +1,16 @@
 # $Id$
+
 PortSystem 1.0
+
 name		mod_dosevasive
 version		1.8
+revision    1
+
+replaced_by mod_evasive
+
 categories	www
-platforms	darwin 
-maintainers	touche.fr.st:julien.touche
+platforms	darwin
+maintainers	nomaintainer
 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 \
@@ -13,37 +19,14 @@
 			tool, and can be easily configured to talk to \
 			ipchains, firewalls, routers, and etcetera. \
 			mod_dosevasive presently reports abuses via email and \
-			syslog facilities. 
+			syslog facilities.
 
 homepage	http://www.nuclearelephant.com/projects/dosevasive/
-master_sites	${homepage}
-distname	${name}.${version}
-checksums	md5 243d24e205c3b82ef55542887e03d998
+distfiles
 
-set worksrcdir	${name}
+livecheck.type      none
 
-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
+pre-configure {
+    ui_error "Please do not install this port since it has been replaced by 'mod_evasive'."
+    return -code error
 }
-
-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}
-}

Modified: trunk/dports/www/mod_evasive/Portfile
===================================================================
--- trunk/dports/www/mod_dosevasive/Portfile	2012-04-23 14:51:32 UTC (rev 92267)
+++ trunk/dports/www/mod_evasive/Portfile	2012-04-23 16:05:21 UTC (rev 92270)
@@ -1,49 +1,77 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
+
 PortSystem 1.0
-name		mod_dosevasive
-version		1.8
+
+name		mod_evasive
+version		1.10.1
 categories	www
-platforms	darwin 
+platforms	darwin
 maintainers	touche.fr.st:julien.touche
 description	apache module against DDoS
-long_description	mod_dosevasive is an evasive maneuvers module for \
+long_description	mod_evasive 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. 
+			mod_evasive presently reports abuses via email and \
+			syslog facilities.
 
-homepage	http://www.nuclearelephant.com/projects/dosevasive/
-master_sites	${homepage}
-distname	${name}.${version}
-checksums	md5 243d24e205c3b82ef55542887e03d998
+homepage	http://www.zdziarski.com/blog/?page_id=442
+master_sites	http://www.zdziarski.com/blog/wp-content/uploads/2010/02/
+distname	${name}_${version}
+checksums   sha1    7240481f9f7b0f80693787a73a2bfd9bfec6f274 \
+            rmd160  1ce741bf3f3bbc0cc81a9aa73311b08a68bd454e
 
 set worksrcdir	${name}
+set apachedir   apache2
+set cversion    "20"
 
 use_configure	no
 
-#variant apache1	{
-	depends_lib	path:${prefix}/etc/apache:apache
-	build.cmd	${prefix}/sbin/apxs
-	set apache	apache
-#}
+variant apache1 conflicts apache2 {
+    depends_lib	port:apache
+    set apachedir apache
+    set cversion ""
+    build.args	-c -o ${name}.so ${name}.c
+}
 
-variant apache2 {
-	depends_lib	path:${prefix}/etc/apache2:apache2
-	build.cmd	${prefix}/sbin/apxs
-	set apache	apache2
+variant apache2 conflicts apache1 {
+    depends_lib	port:apache2
+    set apachedir apache2
+    set cversion "20"
+    build.args	-c -o ${name}${cversion}.so ${name}${cversion}.c
 }
 
-build.args	-c -o ${name}.so ${name}.c
+build.cmd	${prefix}/${apachedir}/bin/apxs
 build.target
 
+destroot.violate_mtree	yes
+
 destroot {
-	xinstall -d -m 755 ${destroot}${prefix}/libexec/${apache} \
+	xinstall -m 755 -d \
+	    ${destroot}${prefix}/${apachedir}/modules \
 		${destroot}${prefix}/share/doc/${name}
-	xinstall -m 755 ${worksrcpath}/${name}.so \
-		${destroot}${prefix}/libexec/${apache}/
-	xinstall -W ${worksrcpath} LICENSE README \
+	xinstall -m 644 ${worksrcpath}/.libs/${name}${cversion}.so \
+		${destroot}${prefix}/apache2/modules
+	xinstall -m 644 -W ${worksrcpath} CHANGELOG LICENSE README \
 		${destroot}${prefix}/share/doc/${name}
 }
+
+post-destroot {
+	exec    ${prefix}/${apachedir}/bin/apxs -e \
+            -S SYSCONFDIR=${prefix}/${apachedir}/conf/standard \
+            -S TARGET=00000-dso \
+            -n "evasive_module" \
+            -a modules/mod_evasive${cversion}.so \
+            2>@1
+    exec    sed -n -E \
+            -e "/IfModule mod_evasive${cversion}.c/,/IfModule/p" \
+            ${worksrcpath}/README \
+            > ${prefix}/${apachedir}/conf/extra/httpd-evasive.conf
+    reinplace   "s|mod_evasive${cversion}.c|evasive_module|" \
+                ${prefix}/${apachedir}/conf/extra/httpd-evasive.conf
+}
+
+if { ![variant_isset apache1] } { default_variants +apache2 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120423/4eb37ccb/attachment.html>


More information about the macports-changes mailing list