# -*- 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 55458 2009-08-11 05:27:11Z snc@macports.org $

PortSystem 1.0

name		        dnsmasq
version		        2.49
categories	        net
#license             GPL
maintainers	        snc openmaintainer
description	        lightweight DNS forwarder and DHCP server
long_description	Dnsmasq is lightweight, easy to configure DNS \
			        forwarder and DHCP server. It is designed to provide \
			        DNS and, optionally, DHCP, to a small network. It can \
                    serve the names of local machines which are not in the \
                    global DNS. The DHCP server integrates with the DNS \
                    server and allows machines with DHCP-allocated \
                    addresses to appear in the DNS with names configured \
                    either in each host or in a central configuration \
                    file. Dnsmasq supports static and dynamic DHCP leases \
                    and BOOTP for network booting of diskless machines.
homepage	        http://www.thekelleys.org.uk/dnsmasq/doc.html

platforms	        darwin
depends_build       port:nawk

master_sites	    http://www.thekelleys.org.uk/dnsmasq/

checksums	        md5    7ccc861d8a733474f9c0a0a127006ee9 \
                    sha1   c9200de6c00736bd0385061d84d8802a07f21dd2 \
                    rmd160 14ff652e247ca2f98a09384730e00b1a97e42d95

patchfiles	        patch-src-config.h.diff \
                    patch-Makefile.diff
post-patch {
	reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/config.h
}

use_configure   no

destroot.args   PREFIX=${prefix}

startupitem.create	yes
#startupitem.type    launchd

livecheck.check     regex
livecheck.url       ${master_sites}
livecheck.regex     LATEST_IS_(\\d\\.\\d+)
