source: trunk/dports/net/openntpd/Portfile

Last change on this file was 124743, checked in by dluke@…, 3 years ago

openntpd: add livecheck, startupitem, copy config file in post-activate

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1# $Id: Portfile 124743 2014-08-27 21:19:27Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    openntpd
6version                 3.9p1
7revision                1
8categories              net
9license                 ISC BSD
10platforms               darwin
11maintainers             nomaintainer
12description             free, easy to use implementation of the Network Time Protocol
13long_description        OpenNTPD is a free, easy to use implementation of the \
14                                Network Time Protocol. It provides the ability to sync the \
15                                local clock to remote NTP servers and can act as NTP server \
16                                itself, redistributing the local clock.
17
18homepage                http://www.openntpd.org/
19master_sites            openbsd:OpenNTPD
20checksums       rmd160  c348004116c78810daa9451f15abcc26788949a8 \
21                sha256  83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49
22
23platforms               darwin
24
25startupitem.create      yes
26startupitem.netchange   yes
27startupitem.executable  ${prefix}/sbin/ntpd -d -s -f ${prefix}/etc/ntpd.conf
28
29configure.args  --mandir=${prefix}/share/man
30
31pre-destroot {
32        addgroup _ntp gid=[nextgid] users="_ntp"
33        set gid [existsgroup _ntp]
34        adduser _ntp gid=${gid} password={\*} uid=[nextuid] \
35                home=${prefix}/var/db/ntpd shell=/usr/bin/false \
36                realname=OpenNTPD\ Server
37}
38
39post-destroot   {
40        file rename ${destroot}${prefix}/etc/ntpd.conf \
41                ${destroot}${prefix}/etc/ntpd.conf.sample
42
43        xinstall -m 755 -d ${destroot}${prefix}/var/db/ntpd
44
45        destroot.keepdirs ${destroot}${prefix}/var/db/ntpd
46}
47
48post-activate   {
49        if {![file exists ${prefix}/etc/ntpd.conf]} {
50                file copy ${prefix}/etc/ntpd.conf.sample ${prefix}/etc/ntpd.conf
51        }
52}
53
54livecheck.type  regex
55livecheck.url   http://www.openntpd.org/portable.html
56livecheck.regex (\\d+\.\\d+p\\d+)
Note: See TracBrowser for help on using the repository browser.