# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name              dnstop
version           20090128
categories        net
platforms         darwin
maintainers       pmq openmaintainer

description       dnstop is a libpcap application that displays tables of DNS traffic
long_description  ${description}

homepage          http://dnstop.measurement-factory.com
master_sites      ${homepage}/src

checksums         md5 827a0d2020b157b925411dd30b6feff3
depends_lib       port:libpcap port:ncurses

patchfiles        patch-hashtbl.h.diff

post-configure {
    # using the short form it'll pick up the /usr/lib one
    reinplace "s|-lcurses|-lncurses|" ${worksrcpath}/Makefile
}

build.env	  LDFLAGS=${configure.ldflags} \
		  CPPFLAGS="${configure.cppflags} -I${prefix}/include/ncurses"

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

livecheck.url	  ${master_sites}/MD5s.txt
livecheck.type	  moddate
