mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
86 lines
3.2 KiB
Tcl
86 lines
3.2 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup github 1.0
|
|
PortGroup lua 1.0
|
|
|
|
name mod_security2
|
|
set name_package modsecurity
|
|
github.setup owasp-modsecurity ${name_package} 2.9.14 v
|
|
revision 0
|
|
|
|
categories www security
|
|
license Apache-2
|
|
maintainers {mps @Schamschula} openmaintainer
|
|
description Apache 2 intrusion detection and prevention engine for web applications
|
|
long_description ModSecurity is an open source intrusion detection and \
|
|
prevention engine for web applications. It operates \
|
|
embedded into the web server, acting as a powerful \
|
|
umbrella - shielding applications from attacks.
|
|
homepage https://github.com/owasp-modsecurity/ModSecurity
|
|
|
|
github.tarball_from releases
|
|
distname ${name_package}-v${version}
|
|
|
|
checksums rmd160 3c3957652d32be2810455f932683373a5ec65281 \
|
|
sha256 746217af916a0c6db9eb6e2610e64090833e1b2f1aa7ae7babda9cf2476f4d8c \
|
|
size 6644472
|
|
|
|
worksrcdir ${distname}
|
|
|
|
depends_build port:pkgconfig
|
|
|
|
depends_lib port:apache2 \
|
|
port:libxml2 \
|
|
port:curl
|
|
|
|
patchfiles patch-apache2-msc_status_engine.c.diff
|
|
|
|
set apxs ${prefix}/bin/apxs
|
|
set httpd_conf ${prefix}/etc/apache2/httpd.conf
|
|
set mdir ${destroot}${prefix}/lib/apache2/modules/
|
|
|
|
lua.version 5.3
|
|
lua.finds_versioned yes
|
|
|
|
configure.args --with-apxs=${apxs} \
|
|
--with-pcre=${prefix}/bin/pcre-config \
|
|
--with-apr=${prefix}/bin/apr-1-config \
|
|
--with-apu=${prefix}/bin/apu-1-config \
|
|
--with-curl=${prefix}/bin/curl-config \
|
|
--with-libxml=${prefix}
|
|
|
|
destroot {
|
|
xinstall -d -m 755 ${mdir}
|
|
xinstall -m 644 -W ${worksrcpath}/apache2/.libs mod_security2.so \
|
|
${mdir}
|
|
xinstall -m 755 -W ${worksrcpath}/mlogc mlogc mlogc-batch-load.pl \
|
|
${destroot}${prefix}/bin
|
|
xinstall -m 755 -W ${worksrcpath}/tools rules-updater.pl \
|
|
${destroot}${prefix}/bin
|
|
xinstall -m 755 -W ${worksrcpath}/mlogc mlogc-default.conf \
|
|
${destroot}${prefix}/etc
|
|
xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
|
|
xinstall -m 644 -W ${worksrcpath} CHANGES LICENSE NOTICE README.md \
|
|
${destroot}${prefix}/share/doc/${name}
|
|
}
|
|
|
|
notes "
|
|
|
|
# Now edit ${httpd_conf} and add the following lines at the end of the LoadModules section:
|
|
LoadFile ${prefix}/lib/libxml2.dylib
|
|
LoadFile ${prefix}/lib/liblua5.3.dylib
|
|
LoadModule security2_module lib/apache2/modules/mod_security2.so
|
|
|
|
# Enable the unique_id_module module, i.e. uncomment the line
|
|
#LoadModule unique_id_module lib/apache2/modules/mod_unique_id.so
|
|
# to
|
|
LoadModule unique_id_module lib/apache2/modules/mod_unique_id.so
|
|
|
|
# And finally reload apache.
|
|
$ sudo apachectl graceful
|
|
|
|
"
|
|
|
|
github.livecheck.regex (2\.\[0-9.\]+)
|