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$ |
---|
3 | PortSystem 1.0 |
---|
4 | name mod_evasive |
---|
5 | version 1.10.1 |
---|
6 | categories www |
---|
7 | platforms darwin |
---|
8 | maintainers mathiesen.info:macintosh |
---|
9 | description apache module against DDoS |
---|
10 | long_description mod_evasive is an evasive maneuvers module for \ |
---|
11 | Apache to provide evasive action in the event of an \ |
---|
12 | HTTP DoS or DDoS attack or brute force attack. It is \ |
---|
13 | also designed to be a detection and network management \ |
---|
14 | tool, and can be easily configured to talk to \ |
---|
15 | ipchains, firewalls, routers, and etcetera. \ |
---|
16 | mod_evasive presently reports abuses via email and \ |
---|
17 | syslog facilities. |
---|
18 | |
---|
19 | homepage http://www.zdziarski.com/blog/?page_id=442 |
---|
20 | master_sites http://www.zdziarski.com/blog/wp-content/uploads/2010/02/ |
---|
21 | distname ${name}_${version} |
---|
22 | checksums sha1 7240481f9f7b0f80693787a73a2bfd9bfec6f274 \ |
---|
23 | rmd160 1ce741bf3f3bbc0cc81a9aa73311b08a68bd454e |
---|
24 | |
---|
25 | set worksrcdir ${name} |
---|
26 | set apachedir apache2 |
---|
27 | set cversion "20" |
---|
28 | |
---|
29 | use_configure no |
---|
30 | |
---|
31 | variant apache1 conflicts apache2 { |
---|
32 | depends_lib port:apache |
---|
33 | set apachedir apache |
---|
34 | set cversion "" |
---|
35 | build.args -c -o ${name}.so ${name}.c |
---|
36 | } |
---|
37 | |
---|
38 | variant apache2 conflicts apache1 { |
---|
39 | depends_lib port:apache2 |
---|
40 | set apachedir apache2 |
---|
41 | set cversion "20" |
---|
42 | build.args -c -o ${name}${cversion}.so ${name}${cversion}.c |
---|
43 | } |
---|
44 | |
---|
45 | build.cmd ${prefix}/${apachedir}/bin/apxs |
---|
46 | build.target |
---|
47 | |
---|
48 | destroot.violate_mtree yes |
---|
49 | |
---|
50 | destroot { |
---|
51 | xinstall -m 755 -d \ |
---|
52 | ${destroot}${prefix}/${apachedir}/modules \ |
---|
53 | ${destroot}${prefix}/share/doc/${name} |
---|
54 | xinstall -m 644 ${worksrcpath}/.libs/${name}${cversion}.so \ |
---|
55 | ${destroot}${prefix}/apache2/modules |
---|
56 | xinstall -m 644 -W ${worksrcpath} CHANGELOG LICENSE README \ |
---|
57 | ${destroot}${prefix}/share/doc/${name} |
---|
58 | } |
---|
59 | |
---|
60 | post-destroot { |
---|
61 | exec ${prefix}/${apachedir}/bin/apxs -e \ |
---|
62 | -S SYSCONFDIR=${prefix}/${apachedir}/conf/standard \ |
---|
63 | -S TARGET=00000-dso \ |
---|
64 | -n "evasive_module" \ |
---|
65 | -a modules/mod_evasive${cversion}.so \ |
---|
66 | 2>@1 |
---|
67 | exec sed -n -E \ |
---|
68 | -e "/IfModule mod_evasive${cversion}.c/,/IfModule/p" \ |
---|
69 | ${worksrcpath}/README \ |
---|
70 | > ${prefix}/${apachedir}/conf/extra/httpd-evasive.conf |
---|
71 | reinplace "s|mod_evasive${cversion}.c|evasive_module|" \ |
---|
72 | ${prefix}/${apachedir}/conf/extra/httpd-evasive.conf |
---|
73 | } |
---|
74 | |
---|
75 | if { ![variant_isset apache1] } { default_variants +apache2 } |
---|