# $Id: Portfile 54601 2009-07-30 06:26:57Z toby@macports.org $

PortSystem 1.0

name		netcat
version		1.10
revision	2
categories	net
maintainers 	darkart.com:opendarwin.org
description	Utility for managing network connections
long_description	Netcat is a simple Unix utility which reads and writes data across \
			network connections using TCP or UDP protocol.  It is designed to be a \
			reliable "back-end" tool that can be used directly or easily driven by \
			other programs and scripts.  At the same time it is a feature-rich \
			network debugging and exploration tool, since it can create almost any \
			kind of connection you would need and has several interesting built-in \
			capabilities.
platforms	darwin freebsd
master_sites	ftp://coast.cs.purdue.edu/pub/tools/unix/netutils/netcat/ \
		ftp://ftp.cuhk.edu.hk/pub/packages/security/purdue/netutils/netcat/ \

##		http://public.www.planetmirror.com/pub/lprng/TOOLS/netcat
##		http://downloads.planetmirror.com/pub/lprng/TOOLS/netcat/nc110.tgz

## provide a 'homepage' to make "port lint" happy...
homepage    http://nc110.sourceforge.net/

##
## build the version string to match how netcat is distributed
regsub -all	"\\." ${version} "" num
## and appropriately name the distfile
distfiles	nc${num}.tgz
extract.mkdir	yes

checksums	md5 402632f2fe01c169ff19a0ad6e9d608c

use_configure   no
build.target	generic

destroot {
              xinstall -m 755 -d ${destroot}${prefix}/share/doc/netcat
              xinstall -m 755 -s -W ${worksrcpath} nc ${destroot}${prefix}/bin
              xinstall -m 644 -W ${worksrcpath} README ${destroot}${prefix}/share/doc/netcat
}
