# $Id: Portfile,v 1.31 2006/06/25 11:00:29 markd Exp $
maintainers toby@opendarwin.org
description Open Source Network Intrusion Detection System
Snort is an open source network intrusion detection system, capable \
of performing real-time traffic analysis and packet logging on IP \
networks. It can perform protocol analysis, content \
searching/matching and can be used to detect a variety of attacks \
and probes, such as buffer overflows, stealth port scans, CGI \
attacks, SMB probes, OS fingerprinting attempts, and much more.
homepage http://www.snort.org/
master_sites ${homepage}dl/current/ \
checksums sha1 3ba7dae8058aecf4e4eb1c7a816a7c8a4fb7c550
depends_lib lib:libpcre:pcre
configure.args --mandir=${prefix}/share/man
depends_lib-append port:mysql5
configure.args-append --with-mysql=${prefix}
patchfiles-append patch-configure
depends_lib-append port:mysql4
configure.args-append --with-mysql=${prefix}
startupitem.start "${prefix}/share/${name}/snort.sh"
startupitem.stop "/bin/kill \$(cat /var/run/snort_*.pid)"
# Copy the Snort database schemas and sample snort.conf
xinstall -d -m 755 ${destroot}${prefix}/share/${name}/schemas
eval xinstall -m 755 [glob ${worksrcpath}/schemas/create*] ${destroot}${prefix}/share/${name}/schemas
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}
xinstall -m 755 ${worksrcpath}/etc/snort.conf ${destroot}${prefix}/etc/${name}/snort.conf.sample
if { [variant_isset server] } {
xinstall -m 755 ${portpath}/${filesdir}/snort.sh \
${destroot}${prefix}/share/${name}/snort.sh
reinplace "s|__PREFIX__|${prefix}|g" \
${destroot}${prefix}/share/${name}/snort.sh
***** File locations *****
The Snort database schemas -> ${prefix}/share/${name}/schemas
The snort.conf sample file -> ${prefix}/etc/${name}/snort.conf.sample (rename to snort.conf)