# $Id: Portfile,v 1.5 2005/05/15 06:05:55 ricci Exp $

PortSystem 1.0
name             adns
version          1.1
revision         1
categories       net
maintainers      toby@opendarwin.org
description      asynchronous DNS client library
long_description \
    adns is a resolver library for C (and C++) programs, and a \
    collection of useful DNS resolver utilities.
homepage         http://www.chiark.greenend.org.uk/~ian/adns/
platforms        darwin

master_sites     ftp://ftp.chiark.greenend.org.uk/users/ian/adns/ \
                 ${homepage}ftp/
checksums        md5 891956e305acf5fc83b099333bf3ffd9

patchfiles      patch-configure \
		patch-settings.make.in \
		patch-src__parse.c \
		patch-src_internal.h

test.run         yes
test.target      check

destroot {
    cd ${worksrcpath}
    xinstall -m 555 client/adnslogres client/adnshost \
        client/adnsresfilter ${destroot}${prefix}/bin
    xinstall -m 444 src/libadns.a ${destroot}${prefix}/lib
    system "ranlib ${destroot}${prefix}/lib/libadns.a"
    xinstall -m 444 src/adns.h ${destroot}${prefix}/include
    xinstall -m 755 dynamic/libadns.dylib.1.1 ${destroot}${prefix}/lib
    system "(cd ${destroot}${prefix}/lib && ln -s libadns.dylib.1.1 libadns.dylib.1)"
    system "(cd ${destroot}${prefix}/lib && ln -s libadns.dylib.1.1 libadns.dylib)"
}
