Revision: 70332 http://trac.macports.org/changeset/70332 Author: snc@macports.org Date: 2010-08-06 08:04:53 -0700 (Fri, 06 Aug 2010) Log Message: ----------- move resolv.conf declaration from plist to config, #25940 Modified Paths: -------------- trunk/dports/net/dnsmasq/Portfile Modified: trunk/dports/net/dnsmasq/Portfile =================================================================== --- trunk/dports/net/dnsmasq/Portfile 2010-08-06 14:12:17 UTC (rev 70331) +++ trunk/dports/net/dnsmasq/Portfile 2010-08-06 15:04:53 UTC (rev 70332) @@ -5,6 +5,7 @@ name dnsmasq version 2.55 +revision 1 categories net license GPL maintainers snc openmaintainer @@ -24,11 +25,12 @@ platforms darwin depends_build port:nawk -notes "A startup item has been generated that will aid in -starting ${name} with launchd. It is disabled -by default. Execute the following command to start it, -and to cause it to launch at startup: -\n\nsudo port load ${name}" +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/ @@ -40,11 +42,14 @@ 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 destroot.args PREFIX=${prefix} +destroot.keepdirs ${destroot}${prefix}/var/run livecheck.type regex livecheck.url ${master_sites} @@ -67,8 +72,14 @@ } 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. - file mkdir ${prefix}/var/run + xinstall -d -m 755 ${destroot}${prefix}/var/run # # Set up a launchd item. The daemondo wrapper is not needed. @@ -96,8 +107,6 @@ puts ${plist} " <array>" puts ${plist} " <string>${prefix}/sbin/dnsmasq</string>" puts ${plist} " <string>-k</string>" - puts ${plist} " <string>-r</string>" - puts ${plist} " <string>/etc/resolv.conf</string>" puts ${plist} " </array>" puts ${plist} " <key>KeepAlive</key>" puts ${plist} " <dict>"
participants (1)
-
snc@macports.org