# $Id: Portfile,v 1.12 2004/04/27 18:36:08 matt Exp $

PortSystem       1.0
name             tcptrace
version          6.6.1
revision	1
categories       net
maintainers      fenner@research.att.com
description      A TCP dump file analysis tool
long_description \
    tcptrace a TCP dump file analysis tool written by Shawn Ostermann at \
    Ohio University. It is NOT a packet capture program. It reads output \
    dump files in the formats of several popular packet capturing \
    programs: tcpdump, snoop, etherpeek, and netm.  It can also output \
    (ie, convert thus converting to) tcpdump format files.
homepage         http://irg.cs.ohiou.edu/software/tcptrace/
platforms        darwin
master_sites     ${homepage}download/
checksums        md5 812e0811a8d470c380c6b30277ac8bc4
depends_lib      lib:libpcap:libpcap

post-configure {
    set path "${worksrcpath}"
    reinplace "s|PCAP_INCS    = -I/usr/local/include -I. -I../pcap -I/usr/include/pcap|PCAP_INCS    = -I${prefix}/include -I/usr/include|" "${path}/Makefile"
    reinplace "s|PCAP_LDFLAGS = -L/usr/local/lib -Llib -Lpcap -L../pcap -L./cygwin-libs|PCAP_LDFLAGS = -I${prefix}/lib -I/usr/lib|" "${path}/Makefile"
}

destroot {
    file mkdir ${destroot}${prefix}/bin
    system "install -m 555 ${worksrcpath}/tcptrace ${destroot}${prefix}/bin/tcptrace"
    file mkdir ${destroot}${prefix}/share/man/man1
    system "install -m 444 ${worksrcpath}/tcptrace.man ${destroot}${prefix}/share/man/man1/tcptrace.1"
}
