# $Id: Portfile,v 1.1 2005/11/24 21:48:33 mww Exp $

PortSystem 1.0

name			checkdns
version			0.5
categories		net
platforms		darwin
maintainers		darwinports@opendarwin.org
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 patch-main.c patch-Makefile

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

build.target	compile

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}
}

platform darwin 8 { build.args CC=/usr/bin/gcc-4.0 }

