# -*- 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_security3
set name_package    modsecurity
github.setup        SpiderLabs ${name_package} 3.0.16 v
revision            0

categories          www security
license             Apache-2
platforms           darwin
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/SpiderLabs/ModSecurity

github.tarball_from releases
distname            ${name_package}-v${version}

checksums           rmd160  c60b616c391d7cb756b27defb5fe2135ae1d7392 \
                    sha256  739be3c71b1939f14e91afe1eeae654acbd440da11bd29790458840bc315b4c0 \
                    size    11784704

depends_build       port:pkgconfig

depends_lib         port:curl \
                    path:lib/pkgconfig/icu-uc.pc:icu \
                    port:libgeoip \
                    port:libmaxminddb \
                    port:libxml2 \
                    port:lua-luarocks \
                    port:pcre \
                    port:ssdeep \
                    port:yajl

lua.version         5.3
lua.finds_versioned yes

configure.args      --with-geoip=${prefix} \
                    --with-pcre=${prefix}/bin/pcre-config \
                    --with-curl=${prefix}/bin/curl-config \
                    --with-libxml=${prefix} \
                    --with-lua=${prefix} \
                    --with-ssdeep=${prefix} \
                    --with-yajl=${prefix}
