maintainers {geeklair.net:dluke @danielluke}
description NTP is a protocol designed to synchronize the clocks of computers over a network.
#license NTP (http://www.eecis.udel.edu/~mills/ntp/html/copyright.html), see http://opensource.org/licenses/NTP
long_description NTP is an implementation of RFC-5905. It is widely \
used to synchronize a computer to Internet time \
servers or other sources.
homepage http://www.ntp.org/
master_sites https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-[join [lrange [split ${version} .] 0 1] .]/
checksums md5 00950ca2855579541896513e78295361 \
rmd160 ceceb7622ac6868b2518127f64b3d24032f7da1c \
sha256 f14a39f753688252d683ff907035ffff106ba8d3db21309b742e09b5c3cd278e
configure.args --enable-ipv6 ac_cv_search_nlist=no
depends_lib port:openssl port:libevent port:libedit
depends_build port:pkgconfig
startupitem.netchange yes
startupitem.executable ${prefix}/sbin/ntpd -n -g -p ${prefix}/var/run/ntpd.pid -f ${prefix}/var/db/ntp.drift -c ${prefix}/etc/ntp.conf
# High Sierra doesn't like the way libntp.a is set up
# see https://lists.macports.org/pipermail/macports-dev/2017-October/036569.html
reinplace "s|^RANLIB = ranlib|RANLIB = ranlib -c|" \
$worksrcpath/libntp/Makefile
xinstall -o root -m 644 ${filespath}/ntp.conf \
${destroot}${prefix}/etc/ntp.conf.dist
xinstall -m 755 -d ${destroot}${prefix}/var/run \
${destroot}${prefix}/var/db
destroot.keepdirs ${destroot}${prefix}/var/run \
${destroot}${prefix}/var/db
#- our conf file contains restrictions to mitigate CVE-2013-5211
if {![file exists ${prefix}/etc/ntp.conf]} {
file copy ${prefix}/etc/ntp.conf.dist ${prefix}/etc/ntp.conf
livecheck.url http://support.ntp.org/rss/releases.xml
livecheck.regex (\\d+\.\\d+.\\d+p\\d+)\.\*Stable