increase dvbapp PR.
[vuplus_openembedded] / recipes / ntp / ntp_4.2.4p7.bb
1 require ntp.inc
2
3 PR = "r1"
4
5 SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
6         file://tickadj.c.patch;patch=1 \
7         file://ntp-4.2.4_p6-nano.patch;patch=1 \
8         file://ntpd \
9         file://ntp.conf \
10         file://ntpdate"
11
12
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"
21
22 do_install_append() {
23         install -d ${D}/${sysconfdir}/init.d
24         install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
25         install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
26         install -d ${D}/${sysconfdir}/network/if-up.d
27         install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
28 }
29
30 pkg_postinst_ntpdate() {
31 if test "x$D" != "x"; then
32         exit 1
33 else
34         if ! grep -q -s ntpdate /etc/cron/crontabs/root; then
35                 echo "adding crontab"
36                 test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs
37                 echo "30 * * * *    /usr/bin/ntpdate -s -u pool.ntp.org" >> /etc/cron/crontabs/root
38         fi
39 fi
40 }