Ticket #19507: Portfile.diff
File Portfile.diff, 3.5 KB (added by usx303@…, 16 years ago) |
---|
-
Portfile
1 # -*- 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 1 2 # $Id$ 2 3 3 4 PortSystem 1.0 … … 3 4 4 5 name snort 5 version 2. 6.1.56 version 2.8.4 6 7 categories net 7 8 maintainers markd … … 18 19 platforms darwin freebsd 19 20 master_sites ${homepage}dl/current/ \ 20 21 ${homepage}dl/old/ 21 checksums sha1 14e65990f70dab4e740e0b8116c671364d3ca8c4 22 patchfiles patch-etc-snort.conf 23 depends_lib port:pcre 24 configure.args --mandir=${prefix}/share/man --disable-dynamicplugin 22 checksums md5 193179da8db8aac5ee6b0a751ce7b76d\ 23 sha1 2e400f34728613f0e285f28dc38a0ae38733ea22\ 24 rmd160 3fae1b0a472a5ae73eea323f312364bc9d7e1e2a 25 26 #patchfiles patch-etc-snort.conf 27 depends_lib port:pcre port:libpcap 28 #configure.args --mandir=${prefix}/share/man --disable-dynamicplugin 25 29 26 variant mysql5 {30 variant mysql5 description {mysql 5 support} { 27 31 depends_lib-append port:mysql5 28 32 configure.args-append --with-mysql=${prefix} 29 33 patchfiles-append patch-configure 30 34 } 31 35 32 variant mysql4 {36 variant mysql4 description {mysql 4 support} { 33 37 depends_lib-append port:mysql4 34 38 configure.args-append --with-mysql=${prefix} 35 39 } 36 40 37 variant server {41 variant server description {startupitem} { 38 42 startupitem.create yes 39 43 startupitem.start "${prefix}/share/${name}/snort.sh" 40 44 startupitem.stop "/bin/kill \$(cat /var/run/snort_*.pid)" … … 48 52 # Copy Snort's etc/ files 49 53 xinstall -d -m 755 ${destroot}${prefix}/etc/${name} 50 54 eval xinstall [glob ${worksrcpath}/etc/*.map] ${destroot}${prefix}/etc/${name} 51 eval xinstall [glob ${worksrcpath}/etc/*.conf ] ${destroot}${prefix}/etc/${name}55 eval xinstall [glob ${worksrcpath}/etc/*.conf*] ${destroot}${prefix}/etc/${name} 52 56 file rename ${destroot}${prefix}/etc/${name}/snort.conf ${destroot}${prefix}/etc/${name}/snort.conf.dist 53 57 58 # fix snort.conf.dist 59 reinplace "s|dynamicpreprocessor directory /usr/local/lib/snort_dynamicpreprocessor/|dynamicpreprocessor directory ${prefix}/lib/snort_dynamicpreprocessor/|g" ${destroot}${prefix}/etc/${name}/snort.conf.dist 60 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 61 reinplace "s|dynamicdetection directory /usr/local/lib/snort_dynamicrule/|dynamicdetection directory ${prefix}/lib/snort_dynamicrule/|g" ${destroot}${prefix}/etc/${name}/snort.conf.dist 62 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 63 64 54 65 if { [variant_isset server] } { 55 66 xinstall -m 755 ${portpath}/${filesdir}/snort.sh \ 56 67 ${destroot}${prefix}/share/${name}/snort.sh … … 65 76 ***** File locations ***** 66 77 67 78 The Snort database schemas -> ${prefix}/share/${name}/schemas 68 The snort.conf sample file -> ${prefix}/etc/${name}/snort.conf. sample(rename to snort.conf)79 The snort.conf sample file -> ${prefix}/etc/${name}/snort.conf.dist (rename to snort.conf) 69 80 70 81 NOTE: If you installed Snort using the +server variant, make sure you do not 71 82 change the location of the snort.conf file or the startup scripts