source: trunk/dports/net/snort/Portfile @ 125738

Last change on this file since 125738 was 125738, checked in by mf2k@…, 4 years ago

adodb argus-monitor base blt cacti cdpr doclifter eventlog expect gkrellm honeyd iwidgets kchmviewer libdnsres monarch moodss moomps nagios nagios-plugins nedi netmrg network-weathermap nfdump nfsen nrg nrpe nsca ntop p5-archive-zip p5-cgi p5-cgi-speedycgi p5-convert-asn1 p5-libintl-perl p5-mhonarc p5-net p5-perl-ldap rancid rrdtool scotty sendpage smokeping snort sympa syslog-ng tclx tftp-hpa tktable uplog vm-pop3d xserve-raid-tools zabbix: Ports abandoned by markd. (#44782)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: Portfile 125738 2014-09-25 14:43:03Z mf2k@macports.org $
2
3PortSystem 1.0
4
5name             snort
6version          2.9.1.2
7categories       net
8maintainers      nomaintainer
9license          GPL-2
10description      Open Source Network Intrusion Detection System
11long_description \
12    Snort is an open source network intrusion detection system, capable \
13    of performing real-time traffic analysis and packet logging on IP \
14    networks. It can perform protocol analysis, content \
15    searching/matching and can be used to detect a variety of attacks \
16    and probes, such as buffer overflows, stealth port scans, CGI \
17    attacks, SMB probes, OS fingerprinting attempts, and much more.
18homepage         http://www.snort.org/
19platforms        darwin freebsd
20master_sites     ${homepage}dl/snort-current/
21
22checksums        rmd160  a28ebd59df80884e1554fb75a4279e97b1dd8b32 \
23                 sha256  eac98be8138f9debdcc8f77061dab1950e88fa40c18311ddbab0a329852375f5
24
25depends_lib      port:daq
26
27startupitem.create  yes
28startupitem.start   "${prefix}/share/${name}/snort.sh"
29startupitem.stop    "/bin/kill \$(cat /var/run/snort_*.pid)"
30
31variant mysql5 description {mysql 5 support} {
32    depends_lib-append    path:bin/mysql_config5:mysql5
33    configure.args-append   --with-mysql-includes=${prefix}/include/mysql5/mysql \
34                            --with-mysql-libraries=${prefix}/lib/mysql5/mysql
35}
36
37variant mysql4 description {mysql 4 support} {
38    depends_lib-append    port:mysql4
39    configure.args-append --with-mysql=${prefix}
40}
41
42post-destroot {
43# Copy the Snort database schemas
44    xinstall -d -m 755 ${destroot}${prefix}/share/${name}/schemas
45    eval xinstall -m 755 [glob ${worksrcpath}/schemas/create*] ${destroot}${prefix}/share/${name}/schemas
46
47# Copy Snort's etc/ files
48    xinstall -d -m 755 ${destroot}${prefix}/etc/${name}
49    eval xinstall [glob ${worksrcpath}/etc/*.map] ${destroot}${prefix}/etc/${name}
50    eval xinstall [glob ${worksrcpath}/etc/*.conf*] ${destroot}${prefix}/etc/${name}
51    file rename ${destroot}${prefix}/etc/${name}/snort.conf ${destroot}${prefix}/etc/${name}/snort.conf.dist
52
53# fix snort.conf.dist
54    reinplace "s|dynamicpreprocessor directory /usr/local/lib/snort_dynamicpreprocessor/|dynamicpreprocessor directory ${prefix}/lib/snort_dynamicpreprocessor/|g" ${destroot}${prefix}/etc/${name}/snort.conf.dist
55    reinplace "s|dynamicengine /usr/local/lib/snort_dynamicengine/libsf_engine.so|dynamicengine ${prefix}/lib/snort_dynamicengine/libsf_engine.dylib|g" ${destroot}${prefix}/etc/${name}/snort.conf.dist
56    reinplace "s|dynamicdetection directory /usr/local/lib/snort_dynamicrule/|dynamicdetection directory ${prefix}/lib/snort_dynamicrule/|g" ${destroot}${prefix}/etc/${name}/snort.conf.dist
57    reinplace "s|dynamicdetection file /usr/local/lib/snort_dynamicrule/libdynamicexamplerule.so|dynamicdetection file ${prefix}/lib/snort_dynamicrule/libdynamicexamplerule.dylib|g" ${destroot}${prefix}/etc/${name}/snort.conf.dist
58
59    xinstall -m 755 ${filespath}/snort.sh \
60        ${destroot}${prefix}/share/${name}/snort.sh
61    reinplace "s|__PREFIX__|${prefix}|g" \
62        ${destroot}${prefix}/share/${name}/snort.sh
63}
64
65notes "
66            ***** File locations *****
67
68The Snort database schemas -> ${prefix}/share/${name}/schemas
69The snort.conf sample file -> ${prefix}/etc/${name}/snort.conf.dist (copy to snort.conf)
70
71NOTE: Make sure you do not change the location of the snort.conf file\
72or the startup scripts will not be able to find it.
73"
74
75livecheck.type      regex
76livecheck.url       ${homepage}snort-downloads
77livecheck.regex     >${name}-(\[0-9.\]+)${extract.suffix}<
Note: See TracBrowser for help on using the repository browser.