# $Id: Portfile 56061 2009-08-24 00:33:19Z ryandesign@macports.org $
PortSystem 1.0

name		ttcp
version		1.10
categories	net
platforms	darwin
maintainers	fenner
description	Benchmarking tool for analysing TCP and UDP performance
long_description        TTCP is a benchmarking tool for determining \
 TCP and UDP performance between 2 systems. \
 \
 The program was created at the US Army Ballistics Research Lab (BRL) \
 and is in the public domain. Feel free to distribute this program \
 but please do leave the credit notices in the source and man page intact.
master_sites	ftp://ftp.sgi.com/sgi/src/ttcp/
dist_subdir	ttcp
distfiles	ttcp.c ttcp.1 README
checksums	ttcp.c md5 3d1b75f6116cc246a4def9788ce58c26 \
		ttcp.1 md5 01d3a511a05dc8a0669f30c15ebaae82 \
		README md5 6b1e5ff6247a9f284f3b58eb651b37a9

pre-extract		{ file mkdir ${worksrcpath} }
extract.cmd		cp
extract.pre_args	{}
extract.post_args	${worksrcdir}

configure	{}
build {
	system "cd \"${worksrcpath}\" && cc -o ttcp ttcp.c"
}
destroot {
	system "install ${worksrcpath}/ttcp ${destroot}${prefix}/bin"
	system "install ${worksrcpath}/ttcp.1 ${destroot}${prefix}/share/man/man1"
	system "install -d ${destroot}${prefix}/share/doc/ttcp"
	system "install ${worksrcpath}/README ${destroot}${prefix}/share/doc/ttcp"
}
