require ntp.inc PR = "r5" SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ file://ntp-4.2.4_p6-nano.patch \ file://ntpd \ file://ntp.conf \ file://ntpdate \ file://ntpdate.service \ file://ntpd.service \ " LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f41fedb22dffefcbfafecc85b0f79cfa" SRC_URI[md5sum] = "65d8cdfae4722226fbe29863477641ed" SRC_URI[sha256sum] = "948274b88f1ed002d867ced6aaefdfd0999668b11285ac2b3a67ff2629d59d88" EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd --with-yielding-select=yes" PACKAGES += "${PN}-perl" do_install_append() { install -d ${D}/${sysconfdir}/init.d install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d install -d ${D}/${sysconfdir}/network/if-up.d install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ ln -sf ../ntpd.service ${D}${systemd_unitdir}/system/multi-user.target.wants/ } FILES_${PN}-bin = "${sbindir}/ntp-wait \ ${sbindir}/ntpdc \ ${sbindir}/ntpq \ ${bindir}/ntptime \ ${sbindir}/ntptrace" FILES_${PN} = "${sbindir}/ntpd \ ${libdir}/ntp \ ${sysconfdir}/ntp.conf \ ${sysconfdir}/init.d/ntpd \ ${systemd_unitdir}/system/ntpd.service \ ${systemd_unitdir}/system/multi-user.target.wants/ntpd.service" FILES_${PN}-tickadj = "${sbindir}/tickadj" FILES_ntp-perl = "${prefix}/share/ntp/lib/NTP/Util.pm \ ${bindir}/ntpsweep ${bindir}/ntptrace \ ${sbindir}/calc_tickadj ${sbindir}/ntp-wait" FILES_ntpdate = "${sbindir}/ntpdate \ ${sysconfdir}/network/if-up.d/ntpdate \ ${systemd_unitdir}/system/ntpdate.service \ ${systemd_unitdir}/system/multi-user.target.wants/ntpdate.service" FILES_ntp-utils = "${sbindir}/* ${bindir}/*" DEPENDS_${PN}-perl = "perl" # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms # with wonky clocks (e.g. OpenSlug) RDEPENDS_${PN} = "${PN}-tickadj" pkg_postinst_ntpdate() { if test "x$D" != "x"; then exit 1 else if ! grep -q -s ntpdate /var/spool/cron/root; then echo "adding crontab" test -d /var/spool/cron || mkdir -p /var/spool/cron echo "30 * * * * /usr/sbin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root fi fi }