Here's what I've come up with so far; let me know if you have further suggestions.
* revbump * gutted no_ variants and made them require the negative of the new variants * new variants conflict with no_ variants, utilize lappend/ldelete * marked date with comment, at a suitable time in the future the no_ variants can be removed * setup build.args using list
# -*- 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 76245 2011-02-19 16:19:44Z [email protected] $ PortSystem 1.0 name dnsmasq version 2.57 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 notes "A startup item has been generated that will aid in\ starting ${name} with launchd. You must specify the\ path to resolv.conf. For your protection, this script\ is disabled by default. Execute the following command\ to start it, and to cause it to launch at startup:\ \n\nsudo port load ${name}" master_sites http://www.thekelleys.org.uk/dnsmasq/ checksums sha1 37e36564f8acfd94af0455fa2a43daf9f2338b76 \ rmd160 fa94717d4e0c7d095d734a18a77baa46ddc2cd54 patchfiles patch-src-config.h.diff \ patch-Makefile.diff post-patch { reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/config.h reinplace s|#resolv-file=|resolv-file=/etc/resolv.conf| \ ${worksrcpath}/dnsmasq.conf.example } use_configure no build.args COPTS="${COPTS}" destroot.args PREFIX=${prefix} destroot.keepdirs ${destroot}${prefix}/var/run livecheck.type regex livecheck.url ${master_sites} livecheck.regex LATEST_IS_(\\d\\.\\d+) # removed +no_ variants 2011-07-04 set COPTS [list -DNO_DHCP -DNO_TFTP -DNO_IPV6] variant dhcp conflicts no_dhcp description { built in DHCP server } { ldelete COPTS -DNO_DHCP } variant no_dhcp requires -dhcp description { Disable built in DHCP server } { } variant tftp conflicts no_tftp description { built in TFTP server } { ldelete COPTS -DNO_TFTP } variant no_tftp requires -tftp description { Disable built in TFTP server } { } variant ipv6 conflicts no_ipv6 description { IPv6 support } { ldelete COPTS -DNO_IPV6 } variant no_ipv6 requires -ipv6 description { Disable IPV6 support } { } post-destroot { # copy configuration file if not previously created if {![file exists ${prefix}/etc/dnsmasq.conf]} { copy ${destroot}${prefix}/etc/dnsmasq.conf.sample \ ${destroot}${prefix}/etc/dnsmasq.conf } # Create the directory that dnsmasq likes to store its pid in. xinstall -d -m 755 ${destroot}${prefix}/var/run # # Set up a launchd item. The daemondo wrapper is not needed. # # Create the plist file. set itemname ${startupitem.name} set uniquename ${startupitem.uniquename} set plistname ${startupitem.plist} set daemondest ${startupitem.location} set itemdir ${prefix}/etc/${daemondest}/${uniquename} file mkdir ${destroot}${itemdir} file attributes ${destroot}${itemdir} -owner root -group wheel set plist [open "${destroot}${itemdir}/${plistname}" w 0644] puts ${plist} "<?xml version='1.0' encoding='UTF-8'?>" puts ${plist} "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"" puts ${plist} "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" puts ${plist} "<plist version='1.0'>" puts ${plist} " <dict>" puts ${plist} " <key>Label</key>" puts ${plist} " <string>${uniquename}</string>" puts ${plist} " <key>ProgramArguments</key>" puts ${plist} " <array>" puts ${plist} " <string>${prefix}/sbin/dnsmasq</string>" puts ${plist} " <string>-k</string>" puts ${plist} " </array>" puts ${plist} " <key>KeepAlive</key>" puts ${plist} " <dict>" puts ${plist} " <key>NetworkState</key>" puts ${plist} " <true/>" puts ${plist} " </dict>" puts ${plist} " </dict>" puts ${plist} "</plist>" close ${plist} # Make a symlink to the plist file. file mkdir "${destroot}/Library/${daemondest}" ln -sf "${itemdir}/${plistname}" "${destroot}/Library/${daemondest}" }
dnsmasq.diff
Description: Binary data
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
