Portfile

# $Id: Portfile 20168 2006-10-26 22:58:22Z blair@macports.org $

PortSystem 1.0

name fragrouter
categories net security
version 1.6
platforms darwin
maintainers pmq@macports.org
description Tool for testing network IDS implementations
long_description \
Fragrouter is a program for routing network traffic in such a way as \
to elude most network intrusion detection systems. \
The attacks implemented correspond to those listed in the Secure \
Networks ``Insertion, Evasion, and Denial of Service: Eluding Network \
Intrusion Detection'' paper of January, 1998. See also net/fragroute.

set debian_patch ${name}_${version}-2.2.diff.gz

# homepage disappeared some years ago...
homepage http://www.monkey.org/~dugsong/
master_sites ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles
checksums ${distname}${extract.suffix} md5 73fdc73f8da0b41b995420ded00533cc \
${debian_patch} md5 23f81f1fb63731acc96718241454afb0

patch_sites http://ftp.debian.org/debian/pool/main/f/fragrouter
patchfiles ${debian_patch}
patch.args -p1

depends_build port:libnet port:libpcap
configure.env CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib
build.env CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib
# build.args -DHAVE_ETHER_HOSTTON

destroot {
xinstall -m 755 -W ${worksrcpath} ${name} ${destroot}${prefix}/bin/
xinstall -m 644 -W ${worksrcpath} ${name}.8 ${destroot}${prefix}/share/man/man8/
}

# should actually replace with something like `uname -p`
platform darwin powerpc {
configure.args --host=powerpc
}

# should just work, cannot test
platform darwin i386 {
configure.args --host=i386
}