# $Id: Portfile 41460 2008-11-03 22:30:53Z markd@macports.org $ PortSystem 1.0 name ntop version 3.3.8 categories net maintainers markd description network traffic probe platforms darwin long_description ntop is a network traffic probe that shows the network \ usage, similar to what the popular top Unix command does. homepage http://www.ntop.org/ master_sites sourceforge checksums md5 19c6a582c285ffae18bf0c3b599d184e depends_build port:gawk depends_lib port:libpcap \ port:gd2 \ port:libpng \ port:gdbm \ port:rrdtool configure.cflags-append -I${prefix}/include configure.args --mandir=${prefix}/share/man use_autoconf yes build.type gnu destroot.target install install-data-as # Create a startupitem to start/stop the server startupitem.create yes startupitem.start "${prefix}/share/${name}/ntop.sh" startupitem.stop "${prefix}/share/${name}/ntop.sh" pre-configure { system "cd ${worksrcpath} && ./autogen.sh --noconfig" } post-destroot { xinstall -m 755 -o nobody -d ${destroot}/${prefix}/var/ntop \ ${destroot}/${prefix}/var/ntop/rrd system "cd ${destroot}${prefix}/var/ntop && \ touch addressQueue.db dnsCache.db macPrefix.db \ ntop_pw.db prefsCache.db rrd/.turd" system "chown -R nobody ${destroot}${prefix}/var/ntop" xinstall -m 755 -d ${destroot}${prefix}/etc/ntop xinstall -m 755 \ ${worksrcpath}/packages/FreeBSD-ports/net/ntop/files/ntop.conf.sample \ ${destroot}${prefix}/etc/ntop/ntop.conf reinplace "s|%%DBDIR%%/ntop|${prefix}/var/ntop|g" \ ${destroot}${prefix}/etc/ntop/ntop.conf reinplace "s|#--interface sis0|--interface en0|g" \ ${destroot}${prefix}/etc/ntop/ntop.conf if { [variant_isset server] } { xinstall -m 755 ${portpath}/${filesdir}/ntop.sh \ ${destroot}${prefix}/share/ntop/ntop.sh reinplace "s|__PREFIX__|${prefix}|g" \ ${destroot}${prefix}/share/ntop/ntop.sh } }