# $Id: Portfile,v 1.7 2005/04/04 01:30:34 jmpp Exp $

PortSystem 1.0

name	   netwox
version	   5.30.0
set	   NetWVers 530
categories	    net
platforms	    darwin
maintainers	    jmpp@opendarwin.org

description	    Toolbox with several features to test an Ethernet/IP network.
long_description	    Netwox is a toolbox containing 197 tools implemented from \
			    the Network Library netwib. They help to find and solve \
			    network problems with common techniques such as sniffing and \
			    spoffing, analazing DNS, FTP, HTTP, IRC, NNTP, SMTP, SNMP, \
			    SYSLOG, TELNET and TFTP traffic, scans, ping and traceroute, \
			    client/servers implementations, etc.

homepage	http://www.laurentconstantin.com/
master_sites	${homepage}common/netw/${name}/download/v5/ \
		http://www.mirrors.wiretapped.net/security/packet-construction/${name}
extract.suffix	.tgz
distfiles	${distname}-src${extract.suffix} \
		${distname}-doc_html${extract.suffix}
checksums	${distname}-src${extract.suffix} md5 4fb5e2d21ce6fac6f6442f3d9556e3e6 \
		${distname}-doc_html${extract.suffix} md5 7d1899ebdf45862d4e230371048d860b

depends_lib	lib:libnetwib${NetWVers}:netwib

worksrcdir	${distname}-src/src

pre-configure	{
		cd ${worksrcpath}
		reinplace "s|/usr/local|${prefix}|g" config.dat
		reinplace "s|\\(NETWOXDEF_PROGCC_INC=\\)\"\"|\\1-I${prefix}/include|g" config.dat
		reinplace "s|\\(NETWOXDEF_PROGCC_LIB=\\)\"\"|\\1-L${prefix}/lib|g" config.dat
		reinplace "s|man|share/man|g" config.dat
		reinplace "s|share/man1|man1|g"	config.dat
}

configure.pre_args	{}
configure.cmd		./genemake

post-destroot	{
		xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
		file copy ${workpath}/${distname}-doc_html ${destroot}${prefix}/share/doc/${name}/html
		xinstall -m 644 -v -W ${worksrcpath}/../doc/ changelog.txt credits.txt \
		guidestyle.txt todo.txt toollist.txt ${destroot}${prefix}/share/doc/${name}/
}

post-activate   {
		ui_msg "\nFull html documentation is installed as part of the port at:\n
		${prefix}/share/doc/${name}/html/\n"
}
