source: trunk/dports/security/sancp/Portfile @ 20463

Last change on this file since 20463 was 20463, checked in by blair@…, 13 years ago

Set the svn:keywords property to 'Id' for all Portfile's. This
re-enables the Id keyword substitution that was present in the CVS
repository.

See this thread for more information:
http://lists.macosforge.org/pipermail/macports-dev/2006-October/000180.html

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