u-boot-bug: Drop do_stage (not needed), add package_stagefile_shell to deploy
[openembedded.git] / recipes / ntp / ntp_4.2.4p7.bb
blobf21befe55484c7fadf5ed66bf288227005982583
1 require ntp.inc
3 PR = "r1"
5 SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
6 file://tickadj.c.patch \
7 file://ntp-4.2.4_p6-nano.patch \
8 file://ntpd \
9 file://ntp.conf \
10 file://ntpdate"
13 # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
14 # with wonky clocks (e.g. OpenSlug)
15 RDEPENDS_${PN} = "${PN}-tickadj"
16 FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
17 FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
18 FILES_${PN}-tickadj = "${bindir}/tickadj"
19 FILES_ntp-utils = "${bindir}/*"
20 FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate"
22 do_configure_prepend() {
23 sed -i -e 's:dist_man_MANS= sntp.1::g' sntp/Makefile.am
26 do_install_append() {
27 install -d ${D}/${sysconfdir}/init.d
28 install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
29 install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
30 install -d ${D}/${sysconfdir}/network/if-up.d
31 install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
34 pkg_postinst_ntpdate() {
35 if test "x$D" != "x"; then
36 exit 1
37 else
38 if ! grep -q -s ntpdate /etc/cron/crontabs/root; then
39 echo "adding crontab"
40 test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs
41 echo "30 * * * * /usr/bin/ntpdate -s -u pool.ntp.org" >> /etc/cron/crontabs/root
46 SRC_URI[md5sum] = "8c19ff62ed4f7d64f8e2aa59cb11f364"
47 SRC_URI[sha256sum] = "5681883ce5cd0666d73c1b907e284653964a25ad4c02a308ab11b54aca8f01c3"