Ticket #25906: Portfile

File Portfile, 2.0 KB (added by jul_bsd@…, 14 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4PortGroup           perl5 1.0
5
6name                openfpc
7version             0.1a
8extract.suffix      .tgz
9categories          security
10platforms           darwin
11maintainers         ports@
12description         set of scripts that combine to provide a lightweight full-packet network traffic recorder & buffering tool
13long_description    OpenFPC is a set of scripts that combine to provide a lightweight full-packet network traffic recorder & buffering tool. It's design goal is to allow non-expert users to deploy a distributed network traffic recorder on COTS hardware while integrating into existing alert and log tools.
14homepage            http://code.google.com/p/openfpc/
15master_sites        http://openfpc.googlecode.com/files/
16
17checksums           md5     4ff90b078354c814740680792645b54d \
18                    sha1    717b350f4b9b89cc18aa67131f5a3ca8f4fcbbfb \
19                    rmd160  c69ef174061329b2a1710fc8c49170b45471f5f0
20
21depends_lib         port:perl5.8
22#depends_run         port:tcpdump
23
24configure           {
25        reinplace "s|CONFIG_FILES=\"./openfpc.conf /etc/openfpc/openfpc.conf /opt/openfpc/openfpc.conf\"|CONFIG_FILES=\"./openfpc.conf /opt/local/etc/openfpc.conf\"|" \
26                ${worksrcpath}/openfpc
27        reinplace "s|#!/usr/bin/perl -I /opt/openfpc/ .|#!${perl5.bin}\\\nuse lib ('${perl5.lib}');|" \
28                ${worksrcpath}/ofpc-extract.pl
29        reinplace "s|my @CONFIG_FILES=(\"openfpc.conf\", \"/etc/openfpc/openfpc.conf\",\"/opt/openfpc/openfpc.conf\");|my @CONFIG_FILES=(\"openfpc.conf\", \"/opt/local/etc/openfpc.conf\");|" \
30                ${worksrcpath}/ofpc-extract.pl
31}
32
33build               {}
34
35destroot            {
36        foreach f {ofpc-extract.pl openfpc} {
37                xinstall -m 755 ${worksrcpath}/$f \
38                        ${destroot}${prefix}/bin
39        }
40        foreach f {ofpcParse.pm} {
41                xinstall -m 644 ${worksrcpath}/$f \
42                        ${perl5.lib}
43        }
44        foreach f {openfpc.conf} {
45                xinstall -m 644 ${worksrcpath}/$f \
46                        ${destroot}${prefix}/etc
47        }
48        xinstall -d ${destroot}${prefix}/share/doc/${name}
49        foreach f {README} {
50                xinstall -m 644 ${worksrcpath}/$f \
51                        ${destroot}${prefix}/share/doc/${name}
52        }
53}
54