PortSystem 1.0

name			trafshow
version			5.2.3
revision		3
checksums		rmd160  f1ae068f898160f16ae9b3cb5f9d73ae3aece6cb \
			sha256  ea7e22674a66afcc7174779d0f803c1f25b42271973b4f75fab293b8d7db11fc \
			size    142615

categories		net
maintainers		nomaintainer
description		continuous network traffic display
long_description	TrafShow continuously displays the information regarding \
			packet traffic on the configured network interface that \
			matches the boolean  expression. It periodically sorts \
			and updates this information. It may be useful for locating \
			suspicious network traffic on the net.
homepage		http://soft.risp.ru/trafshow/index_en.shtml
platforms		darwin
master_sites		ftp://ftp.nsk.su/pub/RinetSoftware/

depends_lib		port:libtool \
			port:libpcap \
					port:ncurses
extract.suffix		.tgz
patchfiles		patch-domain_resolver.c patch-colormask.c patch-trafshow.c patch-trafshow.1 \
			patch-configure implicit.patch libpcap-1.10.patch
build.target            trafshow

fetch.user      anonymous
fetch.password  -macports@

pre-configure {
	xinstall -m 644 -W ${prefix}/share/libtool/build-aux config.guess config.sub ${worksrcpath}
}

configure.cflags-append   "-I${prefix}/include"
configure.args		ac_cv_have_curses=ncurses
post-configure		{	reinplace "s;%%PREFIX%%;${prefix};g" ${worksrcpath}/colormask.c
				reinplace "s;%%PREFIX%%;${prefix};g" ${worksrcpath}/trafshow.c
				reinplace "s;%%PREFIX%%;${prefix};g" ${worksrcpath}/trafshow.1 }

destroot		{	xinstall -W ${worksrcpath} -m 755 -s -c trafshow ${destroot}${prefix}/bin
				xinstall -W ${worksrcpath} -m 755 -s -c trafshow.1 ${destroot}${prefix}/share/man/man1
				xinstall -W ${worksrcpath} -b -m 755 -s -c .trafshow ${destroot}${prefix}/etc/trafshow.default }
