# $Id: Portfile 50278 2009-04-28 18:36:41Z jmr@macports.org $

PortSystem 1.0

name			checkdns
version			0.5
categories		net
platforms		darwin
maintainers		nomaintainer
description		A domain name server analysis and reporting tool
long_description	${description}

homepage		http://www.enderunix.org/checkdns/
master_sites	http://www.enderunix.org/checkdns/
checksums		md5 7420cc7a01217391bb3eb4a2e7da1e96
patchfiles		patch-dns.c.diff patch-main.c.diff patch-Makefile.diff

configure {
	reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/checkdns.conf-dist
	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/main.c
}

build.target	compile
build.args CC=${configure.cc}

destroot {
	xinstall -m 755 ${worksrcpath}/checkdns ${destroot}${prefix}/bin
	xinstall -m 755 -d ${destroot}${prefix}/etc/${name} \
		${destroot}${prefix}/share/${name}
	xinstall -m 644 ${worksrcpath}/checkdns.conf-dist \
		${destroot}${prefix}/etc/${name}/checkdns.conf.sample
	file copy ${worksrcpath}/lang ${destroot}${prefix}/share/${name}
}
