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

Last change on this file since 58230 was 58230, checked in by ryandesign@…, 11 years ago

rewrite mysql5 dependency so mysql5-devel can satisfy it

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# $Id: Portfile 58230 2009-09-24 16:45:22Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name             snort
6version          2.6.1.5
7categories       net
8maintainers      markd
9description      Open Source Network Intrusion Detection System
10long_description \
11    Snort is an open source network intrusion detection system, capable \
12    of performing real-time traffic analysis and packet logging on IP \
13    networks. It can perform protocol analysis, content \
14    searching/matching and can be used to detect a variety of attacks \
15    and probes, such as buffer overflows, stealth port scans, CGI \
16    attacks, SMB probes, OS fingerprinting attempts, and much more.
17homepage         http://www.snort.org/
18platforms        darwin freebsd
19master_sites     ${homepage}dl/current/ \
20                 ${homepage}dl/old/
21checksums        sha1 14e65990f70dab4e740e0b8116c671364d3ca8c4
22patchfiles       patch-etc-snort.conf
23depends_lib      port:pcre
24configure.args   --mandir=${prefix}/share/man --disable-dynamicplugin
25
26variant mysql5 {
27        depends_lib-append    path:bin/mysql_config5:mysql5
28        configure.args-append --with-mysql=${prefix}
29        patchfiles-append       patch-configure
30}
31
32variant mysql4 {
33        depends_lib-append    port:mysql4
34        configure.args-append --with-mysql=${prefix}
35}
36
37variant server {
38    startupitem.create    yes
39    startupitem.start "${prefix}/share/${name}/snort.sh"
40    startupitem.stop  "/bin/kill \$(cat /var/run/snort_*.pid)"
41}
42
43post-destroot {
44# Copy the Snort database schemas
45        xinstall -d -m 755 ${destroot}${prefix}/share/${name}/schemas
46        eval xinstall -m 755 [glob ${worksrcpath}/schemas/create*] ${destroot}${prefix}/share/${name}/schemas
47
48# Copy Snort's etc/ files
49        xinstall -d -m 755 ${destroot}${prefix}/etc/${name}
50        eval xinstall [glob ${worksrcpath}/etc/*.map] ${destroot}${prefix}/etc/${name}
51        eval xinstall [glob ${worksrcpath}/etc/*.conf] ${destroot}${prefix}/etc/${name}
52        file rename ${destroot}${prefix}/etc/${name}/snort.conf ${destroot}${prefix}/etc/${name}/snort.conf.dist
53
54        if { [variant_isset server] } {
55                xinstall -m 755 ${portpath}/${filesdir}/snort.sh \
56                        ${destroot}${prefix}/share/${name}/snort.sh
57                reinplace "s|__PREFIX__|${prefix}|g" \
58                ${destroot}${prefix}/share/${name}/snort.sh
59        }
60}
61
62post-activate {
63        ui_msg "\n
64
65                ***** File locations *****
66
67        The Snort database schemas -> ${prefix}/share/${name}/schemas
68        The snort.conf sample file -> ${prefix}/etc/${name}/snort.conf.sample (rename to snort.conf)
69
70NOTE:   If you installed Snort using the +server variant, make sure you do not
71        change the location of the snort.conf file or the startup scripts
72        will not be able to find it.
73\n"
74
75}
76
Note: See TracBrowser for help on using the repository browser.