# $Id: Portfile,v 1.7 2006/07/22 05:22:56 pguyot Exp $

PortSystem 1.0
name			trafshow
version			5.2.3
revision		1
categories		net
maintainers		noses@noses.com
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/
checksums               md5 0b2f0bb23b7832138b7d841437b9e182 \
						sha1 1c68f603f12357e932c83de850366c9b46e53d89 \
						rmd160 f1ae068f898160f16ae9b3cb5f9d73ae3aece6cb
depends_lib			port:libpcap \
					port:ncurses
extract.suffix		.tgz
patchfiles		patch-domain_resolver.c patch-colormask.c patch-trafshow.c patch-trafshow.1 \
			patch-configure
build.target            trafshow

pre-configure 		{	file copy -force /usr/share/libtool/config.guess ${worksrcpath}/config.guess
				file copy -force /usr/share/libtool/config.sub ${worksrcpath}/config.sub }
configure.env   CFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib
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		{ 	cd ${workpath}/${worksrcdir}
				xinstall -m 755 -s -c trafshow ${destroot}/${prefix}/bin
				xinstall -m 755 -s -c trafshow.1 ${destroot}/${prefix}/share/man/man1
				xinstall -b -m 755 -s -c .trafshow ${destroot}/${prefix}/etc/trafshow.default }
