# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 92306 2012-04-24 22:14:14Z pixilla@macports.org $

PortSystem          1.0

name                rbldnsd
version             0.996b
categories          net
maintainers         pixilla
master_sites        http://www.corpit.ru/mjt/rbldnsd/
platforms           darwin
homepage            http://www.corpit.ru/mjt/rbldnsd.html
distname            ${name}_${version}
worksrcdir          ${name}-${version}

livecheck.url       ${master_sites}
livecheck.regex     "${name}_(\\d+(?:\\.\\d+)\[b-z\])${extract.suffix}"

description	 	rbldnsd is a small and fast DNS daemon which \
                    is especially made to serve DNSBL zone

long_description	The daemon can serve both IP-based (ordb.org, dsbl.org etc) \
                    and name-based (rfc-ignorant.org) blocklists. Unlike DJB's \
                    rbldns, it has ability to specify individual values for every \
                    entry, can serve as many zones on a single IP address as you \
                    wish, and, finally, it is a real nameserver: it can reply to \
                    DNS metadata requests. The daemon keeps all zones in memory \
                    for faster operations, but its memory usage is very efficient, \
                    especially for repeated TXT values which are stored only once.

checksums           md5     9a0f26f3b33764c325a96bd4c61b26fa \
                    sha1    9cfe6cf01c54088cecc3a02902c721ee714f1c28 \
                    rmd160  15be588fb4051f0526084425b586ea7986b6493a

depends_lib         port:zlib

                    configure.pre_args-delete --prefix=${prefix}


pre-destroot {
        # Add user and group, these are the users rbldnsd will start as
        addgroup _rbldnsd
        set gid [existsgroup _rbldnsd]
        adduser _rbldnsd gid=${gid} realname=rbldnsd home=${prefix}/sbin
}

destroot {
     # Install binary
     xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/sbin
     
     # Install man page 'rbldnsd.8'
     xinstall -m 0640 ${worksrcpath}/${name}.8 ${destroot}${prefix}/share/man/man8
}
