source: trunk/dports/security/sancp/Portfile

Last change on this file was 104720, checked in by jmr@…, 4 years ago

sancp: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# $Id: Portfile 104720 2013-04-01 17:17:13Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name                    sancp
6version                 1.6.1
7categories              security
8license                 QPL-1
9maintainers             nomaintainer
10description             Security Analyst Network Connection Profiler
11long_description        This is a network security tool designed to collect \
12                        statistical information regarding network traffic, \
13                        as well as, collect the traffic itself in pcap \
14                        format, all for the purpose of: auditing, historical \
15                        analysis, and network activity discovery.
16homepage                http://www.metre.net/sancp.html
17platforms               darwin
18master_sites            sourceforge
19checksums               ${distname}${extract.suffix} md5 b83e2f4abb2bf7b10fd874aa58f6324c \
20                        sancp-1.6.1.fix200511.a.patch md5 7b357ec3371fc399c7589261f0d8d11b \
21                        sancp-1.6.1.fix200511.b.patch md5 747aa31c477d726ce6a9b233e3e5f4ee
22
23patch_sites             http://sancp.sourceforge.net
24patchfiles              sancp-1.6.1.fix200511.a.patch \
25                        sancp-1.6.1.fix200511.b.patch
26patch.pre_args          -p1
27
28depends_build           port:libpcap
29
30use_configure           no
31
32build.env               CPPFLAGS=-I${prefix}/include \
33                        CFLAGS="-O3 -s -I${prefix}/include" \
34                        LDFLAGS=-L${prefix}/lib
35
36post-patch {
37# Hack to comment out CFLAGS line in Makefile
38        reinplace "s|CFLAGS     =  -O3|#CFLAGS  =  -O3|g" \
39                ${worksrcpath}/Makefile
40}
41
42build.target            ""
43
44destroot {}
45
46post-destroot {
47        xinstall -m 755 -d ${destroot}${prefix}/bin
48        xinstall -m 755 ${worksrcpath}/sancp ${destroot}${prefix}/bin
49        xinstall -m 755 ${worksrcpath}/etc/sancp/sancp.conf ${destroot}${prefix}/etc/sancp.conf.sample
50
51        xinstall -m 755 -d ${destroot}${prefix}/share/doc/sancp
52        xinstall ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/sancp
53        foreach doc [glob ${worksrcpath}/docs/*] {
54        xinstall ${doc} ${destroot}${prefix}/share/doc/sancp
55        }
56        xinstall -m 755 -d ${destroot}${prefix}/var/log/sancp
57        destroot.keepdirs ${destroot}${prefix}/var/log/sancp
58
59# Install startup script
60        xinstall -m 755 -d ${destroot}${prefix}/share/sancp
61        xinstall -m 755 ${portpath}/${filesdir}/sancp.init ${destroot}${prefix}/share/sancp
62        reinplace "s|__PREFIX__|${prefix}|g" \
63                ${destroot}${prefix}/share/sancp/sancp.init
64}
65
66# Create a startupitem to start/stop the server
67    startupitem.create    yes
68    startupitem.start    "${prefix}/share/sancp/sancp.init"
69    startupitem.stop     "killall -c sancp"
70
71post-activate {
72
73ui_msg "\n
74Rename and configure the sample sancp.conf file in ${prefix}/etc.  If
75you want to sniff an interface other than en0, edit the startup script
76${prefix}/share/sancp/sancp.init.
77
78\n"
79}
Note: See TracBrowser for help on using the repository browser.