# $Id: Portfile,v 1.7 2005/04/04 01:31:54 jmpp Exp $

PortSystem 1.0

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

description	    Graphical front end for the netwox toolkbox.
long_description	      Netwag is a TCL/TK based graphical frontend for the netwox \
			      network toolbox, based on the netwib library. It allows one to \
			      easily search amongst tools proposed in netwox and run them, \
			      construct command line instructions, keep a history of \
			      commands, 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 af47cdfad4d705bafaaa047909422afb \
		${distname}-doc_html${extract.suffix} md5 c6c754608780edcd7a33cd1106d9ae5d

depends_lib	bin:wish:tk \
		bin:netwox${NetWVers}:netwox

worksrcdir	${distname}-src/src

pre-configure	{
		cd ${worksrcpath}
		reinplace "s|/usr/local|${prefix}|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 \
		todo.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"
}
