source: trunk/dports/aqua/dnsupdate/Portfile

Last change on this file was 100186, checked in by jmr@…, 5 years ago

dnsupdate: convert docs to UTF-8 to make 10.8's sed happy

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# -*- 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
2# $Id: Portfile 100186 2012-12-03 04:02:25Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup xcode 1.0
6
7name                    dnsupdate
8version                 2.8
9categories              aqua net
10license                 Restrictive/Distributable
11maintainers             jmr openmaintainer
12description             a Mac OS X client for dynamic DNS services
13long_description        DNSUpdate 2 is a client for dynamic DNS services \
14                                        like DynDNS.org and ZoneEdit.com, specific to Mac OS \
15                                        X. It uses the Cocoa framework and is launched at \
16                                        boot time. It comes with a graphic application to \
17                                        configure and monitor the client.
18homepage                http://www.dnsupdate.org/
19master_sites    http://ju.jalon.free.fr/DNSUpdateProject/
20distname                DNSUpdate${version}s
21checksums               md5 e7baab094ee3fa60871eec8f9aa3510e \
22                                sha1 52367f763368a680ddb85f5abd886a2d7d1d0f35 \
23                                rmd160 5deeca2a0468c8dceea89dc5109446ccb6acbbf6
24
25extract.suffix  .tgz
26
27# stop spamming the log every minute, and fix spelling errors in log messages
28# submitted upstream but no new version released yet
29patchfiles      patch-logmessages.diff \
30                patch-project.pbxproj.diff \
31                patch-HTTPLoader.m.diff
32
33post-patch {
34    foreach doc [glob -directory ${worksrcpath} *.lproj/DNSUpdateHelp.rtfd/TXT.rtf] {
35        system "iconv -f MACROMAN -t UTF-8 $doc > ${doc}.new && mv ${doc}.new $doc"
36    }
37        reinplace "s|/usr/local|${prefix}|" \
38                ${worksrcpath}/DNSUpdate2.xcodeproj/project.pbxproj \
39                ${worksrcpath}/DUAppController.m \
40                ${worksrcpath}/duInstallDaemon.py \
41                ${worksrcpath}/duUninstallDaemon.py \
42                ${worksrcpath}/English.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
43                ${worksrcpath}/French.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
44                ${worksrcpath}/German.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
45                ${worksrcpath}/Italian.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
46                ${worksrcpath}/Spanish.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
47                ${worksrcpath}/startDaemon.py \
48                ${worksrcpath}/org.dnsupdate.daemon.plist
49        reinplace "s|/var/log|${prefix}/var/log|" \
50                ${worksrcpath}/DUAppController.m \
51                ${worksrcpath}/duInstallDaemon.py \
52                ${worksrcpath}/English.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
53                ${worksrcpath}/French.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
54                ${worksrcpath}/German.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
55                ${worksrcpath}/Italian.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
56                ${worksrcpath}/Spanish.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
57                ${worksrcpath}/startDaemon.py \
58                ${worksrcpath}/org.dnsupdate.daemon.plist
59        reinplace "s|/var/run|${prefix}/var/run|" \
60                ${worksrcpath}/DUProtocols.h \
61                ${worksrcpath}/English.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
62                ${worksrcpath}/French.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
63                ${worksrcpath}/German.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
64                ${worksrcpath}/Italian.lproj/DNSUpdateHelp.rtfd/TXT.rtf \
65                ${worksrcpath}/Spanish.lproj/DNSUpdateHelp.rtfd/TXT.rtf
66        reinplace "s|org.dnsupdate.daemon|org.macports.dnsupdate|" \
67        ${worksrcpath}/org.dnsupdate.daemon.plist
68}
69
70xcode.target    All
71
72destroot {
73        # Install DNSUpdate application
74        set appName DNSUpdate
75        set appPath ${destroot}${applications_dir}
76        xinstall -d -m 0755 ${appPath}
77        file copy ${worksrcpath}/build/${xcode.configuration}/${appName}.app ${appPath}/${appName}.app
78
79        # Install DNSUpdate daemon
80        xinstall -m 0755 ${worksrcpath}/build/${xcode.configuration}/${appName}.app/Contents/Resources/${name} \
81                ${destroot}${prefix}/sbin/${name}
82
83        # Install LaunchDaemon for DNSUpdate
84        set itemName org.macports.dnsupdate.plist
85        set itemAliasPath ${destroot}/Library/LaunchDaemons
86        set itemPath ${prefix}/etc/LaunchDaemons
87        xinstall -d -m 0755 ${destroot}${itemPath}
88        xinstall -d -m 0755 ${itemAliasPath}
89        xinstall -m 0755 ${worksrcpath}/org.dnsupdate.daemon.plist ${destroot}${itemPath}/${itemName}
90        system "ln -s ${itemPath}/${itemName} ${itemAliasPath}/${itemName}"
91
92        # Create PREFIX/var/log placeholder
93        set logPath ${destroot}${prefix}/var/log
94        xinstall -d -m 0755 ${logPath}
95
96        # Create PREFIX/var/run placeholder
97        set runPath ${destroot}${prefix}/var/run
98        destroot.keepdirs ${logPath} ${runPath}
99}
100
101livecheck.type          regex
102livecheck.url           ${master_sites}
103livecheck.regex         "DNSUpdate(\[0-9\]+(\\.\\w+)+)s${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.