Ticket #46094: patch-mod_evasive-Portfile.diff

File patch-mod_evasive-Portfile.diff, 4.4 KB (added by jul_bsd@…, 9 years ago)
  • www/mod_evasive/Portfile

    old new  
    33
    44PortSystem 1.0
    55
    6 name            mod_evasive
    7 version         1.10.1
    8 categories      www
    9 platforms       darwin
    10 maintainers     touche.fr.st:julien.touche
    11 description     apache module against DDoS
    12 long_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.
    20 
    21 homepage        http://www.zdziarski.com/blog/?page_id=442
    22 master_sites    http://www.zdziarski.com/blog/wp-content/uploads/2010/02/
    23 distname        ${name}_${version}
    24 checksums   sha1    7240481f9f7b0f80693787a73a2bfd9bfec6f274 \
    25             rmd160  1ce741bf3f3bbc0cc81a9aa73311b08a68bd454e
     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}
    2628
    27 set worksrcdir  ${name}
     29set worksrcdir    ${name}
    2830set apachedir   apache2
    2931set cversion    "20"
    3032
    31 use_configure   no
     33use_configure    no
    3234
    33 variant apache1 conflicts apache2 {
    34     depends_lib port:apache
     35variant apache1 description "Apache 1.x module" conflicts apache2 {
     36    depends_lib    port:apache
    3537    set apachedir apache
    3638    set cversion ""
    37     build.args  -c -o ${name}.so ${name}.c
     39    build.args    -c -o ${name}.so ${name}.c
    3840}
    3941
    40 variant apache2 conflicts apache1 {
    41     depends_lib port:apache2
     42variant apache2 description "Apache 2.x module" conflicts apache1 {
     43    depends_lib    port:apache2
    4244    set apachedir apache2
    4345    set cversion "20"
    44     build.args  -c -o ${name}${cversion}.so ${name}${cversion}.c
     46    build.args    -c -o ${name}${cversion}.so ${name}${cversion}.c
    4547}
    4648
    47 build.cmd       ${prefix}/${apachedir}/bin/apxs
     49build.cmd    ${prefix}/${apachedir}/bin/apxs
    4850build.target
    4951
    50 destroot.violate_mtree  yes
     52destroot.violate_mtree    yes
    5153
    5254destroot {
    53         xinstall -m 755 -d \
    54             ${destroot}${prefix}/${apachedir}/modules \
    55                 ${destroot}${prefix}/share/doc/${name}
    56         xinstall -m 644 ${worksrcpath}/.libs/${name}${cversion}.so \
    57                 ${destroot}${prefix}/apache2/modules
    58         xinstall -m 644 -W ${worksrcpath} CHANGELOG LICENSE README \
    59                 ${destroot}${prefix}/share/doc/${name}
     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}
    6062}
    6163
    6264post-destroot {
    63         exec    ${prefix}/${apachedir}/bin/apxs -e \
     65    exec    ${prefix}/${apachedir}/bin/apxs -e \
    6466            -S SYSCONFDIR=${prefix}/${apachedir}/conf/standard \
    6567            -S TARGET=00000-dso \
    6668            -n "evasive_module" \
     
    7577}
    7678
    7779if { ![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
     84## always get 503, 404 in macport while working manually...
     85livecheck.type      none
     86#livecheck.type      regex
     87#livecheck.url       ${homepage}
     88#livecheck.regex     "mod_evasive_(\\d+(?:\\.\\d+)*).tar.gz"