void-packages/srcpkgs/ntp/template

46 lines
1.4 KiB
Text

# Template file for 'ntp'
pkgname=ntp
version=4.2.7p421
revision=1
wrksrc="ntp-dev-${version}"
build_style=gnu-configure
configure_args="--with-crypto --enable-linuxcap --enable-ipv6
--with-lineeditlibs=readline ol_cv_pthread_select_yields=yes"
hostmakedepends="pkg-config bison"
makedepends="readline-devel openssl-devel libcap-devel libevent-devel"
short_desc="The Network Time Protocol daemon and utilities"
license="BSD"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.ntp.org/"
distfiles="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-dev/ntp-dev-${version}.tar.gz"
checksum=cc362f1a5bce1658761283bf3dcb14674557de953a0688973bb04c501f8baf10
depends="shadow"
conf_files="/etc/ntp.conf"
system_accounts="ntpd"
provides="ntp-daemon-0"
replaces="ntp-daemon>=0"
post_install() {
# ntpd service
vinstall ${FILESDIR}/ntpd.tmpfiles 644 usr/lib/tmpfiles.d ntpd.conf
vinstall ${FILESDIR}/ntpd.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/ntp.conf 644 etc
# ntpdate service
vinstall ${FILESDIR}/ntpdate.service 644 usr/lib/systemd/system
# For systemd-timedated.
vmkdir usr/lib/systemd/ntp-units.d
echo "ntpd.service" > ${DESTDIR}/usr/lib/systemd/ntp-units.d/60-ntp.list
}
ntp-perl_package() {
depends="ntp>=$version perl>=0"
noarch=yes
short_desc+=" - perl scripts"
pkg_install() {
for f in ntp-wait ntptrace; do
vmove usr/bin/${f}
done
vmove usr/share/ntp/lib
}
}