Ticket #29825: Portfile

File Portfile, 2.9 KB (added by pixilla (Bradley Giesbrecht), 13 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5name                mod_security2
6version             2.6.0
7categories          www security
8platforms           darwin
9maintainers         mathiesen.info:macintosh pixilla
10description         Apache 2 intrusion detection and prevention engine for web applications
11long_description    ModSecurity is an open source intrusion detection and \
12                    prevention engine for web applications. It operates \
13                    embedded into the web server, acting as a powerful \
14                    umbrella - shielding applications from attacks.
15homepage            http://www.modsecurity.org
16master_sites        sourceforge:mod-security
17distname            modsecurity-apache_${version}
18worksrcdir          ${distname}
19
20set apachever       apache2
21
22depends_build       port:libxml2 \
23                    port:lua \
24                    port:pcre \
25                    port:curl \
26                    port:apr \
27                    port:apr-util
28depends_lib         port:${apachever}
29
30checksums           sha1    280061a6cb49c955d7371b9526193f68a12ae2ac \
31                    rmd160  a9d34e17d80007f394087da5bd92c6047f48d343
32
33configure.args      --with-apxs=${prefix}/${apachever}/bin/apxs \
34                    --with-pcre=${prefix}/bin/pcre-config \
35                    --with-apr=${prefix}/bin/apr-1-config \
36                    --with-apu=${prefix}/bin/apu-1-config \
37                    --with-curl=${prefix}/bin/curl-config \
38                    --with-libxml=${prefix} \
39                    --with-lua=${prefix}
40
41destroot.violate_mtree yes
42
43destroot {
44    xinstall -d -m 755 ${destroot}${prefix}/${apachever}/modules
45    xinstall -m 644 -W ${worksrcpath}/apache2/.libs mod_security2.so \
46                        ${destroot}${prefix}/${apachever}/modules
47    xinstall -m 755 -W ${worksrcpath}/mlogc mlogc mlogc-batch-load.pl \
48                        ${destroot}${prefix}/bin
49    xinstall -m 755 -W ${worksrcpath}/tools rules-updater.pl \
50                        ${destroot}${prefix}/bin
51    xinstall -m 755 -W ${worksrcpath}/mlogc mlogc-default.conf \
52                        ${destroot}${prefix}/etc
53    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
54    xinstall -m 644 -W ${worksrcpath} CHANGES LICENSE NOTICE README.TXT \
55                        ${destroot}${prefix}/share/doc/${name}
56    xinstall -d -m 755 ${destroot}${prefix}/${apachever}/conf/extra
57    set fp [open ${destroot}${prefix}/${apachever}/conf/extra/httpd-security.conf w]
58    puts $fp \
59"LoadFile ${prefix}/lib/libxml2.dylib
60LoadFile ${prefix}/lib/liblua.dylib
61LoadModule security2_module modules/mod_security2.so"
62  close $fp
63}
64
65notes "
66
67    To enable ${name} in apache2, add the following lines to
68    ${prefix}/apache2/conf/httpd.conf
69    # mod_security2
70    Include conf/extra/httpd-security.conf
71
72"