# $Id: Portfile,v 1.15 2006/01/29 21:38:42 mww Exp $ PortSystem 1.0 name ntop version 3.2 categories net maintainers mww@opendarwin.org 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 extract.suffix .tgz checksums md5 cd29a876b34a7dd76555e9acd8f160bb depends_build port:gawk depends_lib port:libpcap \ port:gd2 \ port:libpng \ port:gdbm configure.env CFLAGS=-I${prefix}/include \ CPPFLAGS=-I${prefix}/include \ LDFLAGS=-L${prefix}/lib configure.args --with-localedir=${prefix}/share/locale \ --mandir=${prefix}/share/man build.type gnu destroot.target install install-data-as variant server { # 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" } 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 } } platform darwin 6 { patchfiles patch-darwin6-util.c } platform darwin 8 { configure.env-append CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0 build.env MACOSX_DEPLOYMENT_TARGET=10.4 }