/
Portfile
52 lines (41 loc) · 1.69 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# $Id$
PortSystem 1.0
name ddclient
version 3.7.0
platforms darwin
categories net
maintainers yeled@macports.org
description Update dynamic DNS entries
long_description ddclient is a Perl client used to update dynamic \
DNS entries for accounts on many dynamic DNS services.
homepage http://ddclient.sourceforge.net/
master_sites sourceforge:ddclient
checksums md5 67976f65c2aad267664267bed940ce18
depends_run bin:perl:perl5.8
configure {
reinplace "s|\[\r\]$||" ${worksrcpath}/${portname}
reinplace "s|^#!.*/perl.*$|#!${prefix}/bin/perl|" ${worksrcpath}/${portname}
reinplace "s|/etc/|${prefix}/etc/|" ${worksrcpath}/${portname}
}
build {}
pre-destroot {
file mkdir ${destroot}${prefix}/etc/ddclient
}
destroot {
xinstall -m 555 ${worksrcpath}/sample-etc_ddclient.conf \
${destroot}${prefix}/etc/ddclient/ddclient.conf.sample
reinplace "s|/var/run|${prefix}/var/run|" \
${destroot}${prefix}/etc/ddclient/ddclient.conf.sample
xinstall -m 555 ${worksrcpath}/${portname} ${destroot}${prefix}/sbin
xinstall -d ${destroot}${prefix}/share/doc/${portname}
eval file copy [glob ${worksrcpath}/sample-*] \
${destroot}${prefix}/share/doc/${portname}
eval file copy [glob ${worksrcpath}/COPY*] \
${destroot}${prefix}/share/doc/${portname}
eval file copy [glob ${worksrcpath}/README*] \
${destroot}${prefix}/share/doc/${portname}
destroot.keepdirs ${destroot}${prefix}/var/run
}
startupitem.create yes
startupitem.start ${prefix}/sbin/ddclient
startupitem.stop "/bin/kill \$(cat ${prefix}/var/run/ddclient.pid)"