| 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 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | |
|---|
| 6 | name ntop-ng |
|---|
| 7 | version 1.2.1 |
|---|
| 8 | categories net |
|---|
| 9 | maintainers yahoo.fr:jul_bsd openmaintainer |
|---|
| 10 | license GPL-3 |
|---|
| 11 | |
|---|
| 12 | description network traffic probe NG |
|---|
| 13 | platforms darwin |
|---|
| 14 | long_description ntop is a network traffic probe that shows the network \ |
|---|
| 15 | usage, similar to what the popular top Unix command does. |
|---|
| 16 | |
|---|
| 17 | homepage http://www.ntop.org/products/ntop/ |
|---|
| 18 | master_sites sourceforge:project/ntop/ntopng |
|---|
| 19 | distname ntopng-${version} |
|---|
| 20 | extract.suffix .tgz |
|---|
| 21 | #worksrcdir ntopng-${version} |
|---|
| 22 | |
|---|
| 23 | checksums rmd160 af8cb3b711a8a6d73a3e73d3765cc09c29379ff4 \ |
|---|
| 24 | sha256 9b98114358d350caad2dcdbacceb895288f958dbbbfddf21a23b921d1a1b68b5 |
|---|
| 25 | |
|---|
| 26 | depends_build port:gawk \ |
|---|
| 27 | port:automake \ |
|---|
| 28 | port:autoconf \ |
|---|
| 29 | port:libtool \ |
|---|
| 30 | port:libevent |
|---|
| 31 | |
|---|
| 32 | depends_lib port:libpcap \ |
|---|
| 33 | port:glib2 \ |
|---|
| 34 | port:libgeoip \ |
|---|
| 35 | port:rrdtool \ |
|---|
| 36 | port:libxml2 \ |
|---|
| 37 | port:redis \ |
|---|
| 38 | port:lua \ |
|---|
| 39 | port:json-c \ |
|---|
| 40 | port:json-glib \ |
|---|
| 41 | port:gnutls \ |
|---|
| 42 | port:zmq \ |
|---|
| 43 | port:sqlite3 |
|---|
| 44 | |
|---|
| 45 | ## clang = error: unknown type name 'lua_Unsigned'; did you mean 'unsigned'? |
|---|
| 46 | ## llvm-gcc-4.2 = configure: cc1: error: unrecognized command line option "-fno-color-diagnostics" |
|---|
| 47 | ## http://comments.gmane.org/gmane.linux.ntop.general/17354 => xcode5+ |
|---|
| 48 | ## gcc-mp-4.9: error: unrecognized command line option '-fno-color-diagnostics' |
|---|
| 49 | #compiler.blacklist-append clang macports-gcc-4.2 macports-gcc-4.9 |
|---|
| 50 | #configure.compiler macports-gcc-4.9 |
|---|
| 51 | |
|---|
| 52 | #use_automake yes |
|---|
| 53 | use_autoconf yes |
|---|
| 54 | |
|---|
| 55 | ## ERROR: config.status:823: error: cannot find input file: `config.h.in' = call autogen.sh |
|---|
| 56 | ## FIXME! https://svn.ntop.org/bugzilla/show_bug.cgi?id=468 |
|---|
| 57 | |
|---|
| 58 | startupitem.create yes |
|---|
| 59 | startupitem.executable ${prefix}/bin/ntop @${prefix}/etc/ntop/ntop.conf |
|---|
| 60 | |
|---|
| 61 | destroot.keepdirs ${destroot}${prefix}/var/ntop/rrd |
|---|
| 62 | |
|---|
| 63 | pre-configure { |
|---|
| 64 | system -W ${worksrcpath} "./autogen.sh" |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | post-destroot { |
|---|
| 68 | xinstall -m 755 -o nobody -d ${destroot}${prefix}/var/ntop \ |
|---|
| 69 | ${destroot}${prefix}/var/ntop/rrd |
|---|
| 70 | |
|---|
| 71 | xinstall -m 755 -d ${destroot}${prefix}/etc/ntop |
|---|
| 72 | xinstall -m 755 \ |
|---|
| 73 | ${worksrcpath}/packages/FreeBSD-ports/net/ntop/files/ntop.conf.sample \ |
|---|
| 74 | ${destroot}${prefix}/etc/ntop |
|---|
| 75 | reinplace "s|%%DBDIR%%/ntop|${prefix}/var/ntop|g" \ |
|---|
| 76 | ${destroot}${prefix}/etc/ntop/ntop.conf.sample |
|---|
| 77 | reinplace "s|#--interface sis0|--interface en0|g" \ |
|---|
| 78 | ${destroot}${prefix}/etc/ntop/ntop.conf.sample |
|---|
| 79 | } |
|---|
| 80 | |
|---|
| 81 | post-activate { |
|---|
| 82 | foreach f {addressQueue.db dnsCache.db macPrefix.db ntop_pw.db prefsCache.db} { |
|---|
| 83 | if {![file exists ${prefix}/var/ntop/${f}]} { |
|---|
| 84 | touch ${prefix}/var/ntop/${f} |
|---|
| 85 | file attributes ${prefix}/var/ntop/${f} -owner nobody |
|---|
| 86 | } |
|---|
| 87 | } |
|---|
| 88 | if {![file exists ${prefix}/etc/ntop/ntop.conf]} { |
|---|
| 89 | copy ${prefix}/etc/ntop/ntop.conf.sample ${prefix}/etc/ntop/ntop.conf |
|---|
| 90 | } |
|---|
| 91 | } |
|---|
| 92 | |
|---|
| 93 | test.run yes |
|---|
| 94 | test.cmd ntopng -h |
|---|
| 95 | |
|---|
| 96 | universal_variant no |
|---|
| 97 | |
|---|
| 98 | variant debug description {get easier debugging} { |
|---|
| 99 | reinplace "|-O2 -Os||" ${worksrcpath}/Makefile |
|---|
| 100 | } |
|---|
| 101 | |
|---|
| 102 | livecheck.type regex |
|---|
| 103 | livecheck.url http://sourceforge.net/projects/ntop/files/ntopng/ |
|---|
| 104 | livecheck.regex /ntopng-(\\d+\.\\d+(?:.+)*)${extract.suffix} |
|---|