source: trunk/dports/www/mod_evasive/Portfile

Last change on this file was 128954, checked in by ionic@…, 3 years ago

mod_evasive: apply maintainer patch. fixes #46094.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# -*- 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
2# $Id: Portfile 128954 2014-12-01 03:18:25Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mod_evasive
7version             1.10.1
8categories          www
9platforms           darwin
10maintainers         nomaintainer
11description         apache module against DDoS
12long_description    mod_evasive is an evasive maneuvers module for \
13                    Apache to provide evasive action in the event of an \
14                    HTTP DoS or DDoS attack or brute force attack. It is \
15                    also designed to be a detection and network management \
16                    tool, and can be easily configured to talk to \
17                    ipchains, firewalls, routers, and etcetera. \
18                    mod_evasive presently reports abuses via email and \
19                    syslog facilities.
20license             GPL-2
21
22checksums           rmd160  1ce741bf3f3bbc0cc81a9aa73311b08a68bd454e \
23                    sha256  07c45139aa313899484a900f0fc162b3e17eb4f60fe474d7f3dd6c9941e95667
24
25homepage            http://www.zdziarski.com/blog/?page_id=442
26master_sites        http://www.zdziarski.com/blog/wp-content/uploads/2010/02/
27distname            ${name}_${version}
28
29set worksrcdir  ${name}
30set apachedir   apache2
31set cversion    "20"
32
33use_configure   no
34
35variant apache1 description "Apache 1.x module" conflicts apache2 {
36    depends_lib     port:apache
37    set apachedir   apache
38    set cversion    ""
39    build.args      -c -o ${name}.so ${name}.c
40}
41
42variant apache2 description "Apache 2.x module" conflicts apache1 {
43    depends_lib     port:apache2
44    set apachedir   apache2
45    set cversion    "20"
46    build.args      -c -o ${name}${cversion}.so ${name}${cversion}.c
47}
48
49build.cmd       ${prefix}/${apachedir}/bin/apxs
50build.target
51
52destroot.violate_mtree  yes
53
54destroot {
55    xinstall -m 755 -d \
56        ${destroot}${prefix}/${apachedir}/modules \
57        ${destroot}${prefix}/share/doc/${name}
58    xinstall -m 644 ${worksrcpath}/.libs/${name}${cversion}.so \
59        ${destroot}${prefix}/apache2/modules
60    xinstall -m 644 -W ${worksrcpath} CHANGELOG LICENSE README \
61        ${destroot}${prefix}/share/doc/${name}
62}
63
64post-destroot {
65    exec    ${prefix}/${apachedir}/bin/apxs -e \
66            -S SYSCONFDIR=${prefix}/${apachedir}/conf/standard \
67            -S TARGET=00000-dso \
68            -n "evasive_module" \
69            -a modules/mod_evasive${cversion}.so \
70            2>@1
71    exec    sed -n -E \
72            -e "/IfModule mod_evasive${cversion}.c/,/IfModule/p" \
73            ${worksrcpath}/README \
74            > ${prefix}/${apachedir}/conf/extra/httpd-evasive.conf
75    reinplace   "s|mod_evasive${cversion}.c|evasive_module|" \
76                ${prefix}/${apachedir}/conf/extra/httpd-evasive.conf
77}
78
79if { ![variant_isset apache1] } { default_variants +apache2 }
80
81notes "This port has received no updates since 2010. You are strongly encouraged to use maintained alternatives."
82
83## always get 503, 404 in macport while working manually...
84livecheck.type      none
85#livecheck.type      regex
86#livecheck.url       ${homepage}
87#livecheck.regex     "mod_evasive_(\\d+(?:\\.\\d+)*).tar.gz"
Note: See TracBrowser for help on using the repository browser.