Ticket #25899: Portfile

File Portfile, 3.1 KB (added by jul_bsd@…, 10 years ago)
Line 
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
2# $Id$
3
4PortSystem          1.0
5PortGroup        ruby 1.0
6
7name                nsm-console
8version             0.7
9categories          net security
10platforms           darwin
11maintainers         nomaintainer
12license             LGPL
13description         framework for performing analysis on packet capture files
14long_description    NSM-Console (Network Security Monitoring Console) \
15                    is a framework for performing analysis on packet \
16                    capture files. It implements a modular structure to \
17                    allow for an analyst to quickly write modules of \
18                    their own without any programming language \
19                    experience. Using these modules a large amount of \
20                    pcap analysis can be performed quickly using a \
21                    set of global (as well as per-module) options. It \
22                    aims to be simple to run and easy to understand \
23                    without a lot of learning time.
24homepage            http://writequit.org/projects/nsm-console/
25master_sites        http://writequit.org/projects/nsm-console/files/
26
27checksums           rmd160  227db94d9b9ff5fe1ca85b74d3df7e2b2b22bb91 \
28                    sha256  36cc2efe466d47b0a4eaa53169e9e63fb1a4dc2938f2ceac10176274674a4908
29
30depends_run         port:wireshark port:ngrep port:tcpflow port:snort \
31                    port:p0f port:argus port:argus-clients \
32                    port:tcpick port:tcptrace port:foremost \
33                    port:chaosreader port:tcpdstat port:tcpxtract
34
35worksrcdir          nsm-console
36
37## advanced
38#fetch.type         git
39#git.url             git://github.com/dakrone/nsm-console.git
40
41use_configure       no
42build               {}
43
44post-build          {
45    reinplace "s|require 'lib/command_manager'|$:.push(\"${ruby.lib}/nsm-console\")\\\nrequire 'lib/command_manager'|" \
46        ${worksrcpath}/nsm
47    reinplace "s|\$moduledir = \"modules\"|\$moduledir = \"${prefix}/share/${name}/modules\"|" \
48        ${worksrcpath}/nsm
49    reinplace "s|logfilename = \"logs/nsm-log.\"|logfilename = \"${prefix}/var/log/nsm-console/nsm-log.\"|" \
50        ${worksrcpath}/lib/nsm_console.rb
51}
52
53destroot        {
54    xinstall -m 755 ${worksrcpath}/nsm \
55               ${destroot}${prefix}/bin
56    xinstall -d ${destroot}${prefix}/share/doc/${name}
57    foreach f {CHANGELOG TODO docs/NSM-Console.pdf} {
58        xinstall -m 644 ${worksrcpath}/$f \
59            ${destroot}${prefix}/share/doc/${name}
60    }
61    xinstall -d ${destroot}${ruby.lib}/${name}
62    file copy ${worksrcpath}/lib \
63            ${destroot}${ruby.lib}/${name}/
64    xinstall -d ${destroot}${prefix}/share/${name}
65    file copy ${worksrcpath}/modules \
66            ${destroot}${prefix}/share/${name}/
67    xinstall -d -m 1777 ${destroot}${prefix}/var/log/${name}
68    destroot.keepdirs-append ${destroot}${prefix}/var/log/${name}
69
70}
71
72livecheck.type     regex
73livecheck.url       ${homepage}
74livecheck.regex     "The latest stable version of NSM-Console is <a href=\"files/nsm-console-.*.tar.gz\">version (\\d+(?:\\.\\d+)*)</a>"
75