diff --git a/srcpkgs/ntp/REMOVE b/srcpkgs/ntp/REMOVE index 7dbbdb2dac8..ef52911fb19 100644 --- a/srcpkgs/ntp/REMOVE +++ b/srcpkgs/ntp/REMOVE @@ -3,9 +3,8 @@ # case "${ACTION}" in -post) - if [ -d var/chroot/ntpd ]; then - rm -rf var/chroot/ntpd - fi +purge) + [ -d var/chroot/ntpd ] && rm -rf var/chroot/ntpd + [ -f var/db/ntpd.drift ] && rm -f var/db/ntpd.drift ;; esac diff --git a/srcpkgs/ntp/files/ntpd.logrotate b/srcpkgs/ntp/files/ntpd.logrotate new file mode 100644 index 00000000000..e47d14dbed2 --- /dev/null +++ b/srcpkgs/ntp/files/ntpd.logrotate @@ -0,0 +1,7 @@ +/var/log/ntpd.log { + missingok + sharedscripts + postrotate + /etc/init.d/ntpd reload >/dev/null 2>&1 || true + endscript +} diff --git a/srcpkgs/ntp/template b/srcpkgs/ntp/template index 408738b6d0b..64ddbac2f11 100644 --- a/srcpkgs/ntp/template +++ b/srcpkgs/ntp/template @@ -1,6 +1,7 @@ # Template file for 'ntp' pkgname=ntp version=4.2.6p4 +revision=1 homepage="http://www.ntp.org/" distfiles="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$version.tar.gz" build_style=gnu_configure @@ -31,15 +32,16 @@ Add_dependency build libcap-devel post_install() { - install -d ${DESTDIR}/var/chroot/ntpd - install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/conf.d - install -d ${DESTDIR}/usr/share/ntp ${DESTDIR}/etc/cron.hourly - install -d ${DESTDIR}/usr/share/doc/ntp - install -m 644 ${FILESDIR}/ntpd.confd ${DESTDIR}/etc/conf.d/ntpd - install -m 755 ${FILESDIR}/ntpd.rc ${DESTDIR}/etc/init.d/ntpd - install -m 644 ${FILESDIR}/ntp.conf ${DESTDIR}/etc/ntp.conf - install -m 744 ${FILESDIR}/ntpd.cron-hourly \ - ${DESTDIR}/etc/cron.hourly/ntpd_recheck - cp -a ${wrksrc}/html ${DESTDIR}/usr/share/doc/ntp - cp -a ${wrksrc}/conf ${DESTDIR}/usr/share/ntp + vmkdir var/chroot/ntpd + vmkdir usr/share/ntp + vmkdir usr/share/doc/ntp + + vinstall ${FILESDIR}/ntpd.confd 644 etc/conf.d ntpd + vinstall ${FILESDIR}/ntpd.rc 755 etc/init.d ntpd + vinstall ${FILESDIR}/ntp.conf 644 etc + vinstall ${FILESDIR}/ntpd.cron-hourly 744 etc/cron.hourly ntpd_recheck + vinstall ${FILESDIR}/ntpd.logrotate 644 etc/logrotate.d ntpd + + vcopy html usr/share/doc/ntp + vcopy conf usr/share/ntp }