summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-11-08 14:11:21 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-11-08 14:47:40 +0100
commitdd7c7f11049ecc4eb6cf898059d2dca2766c8408 (patch)
tree8edc4a47ce14641c89e2af104fe490b01a526ccf /meta-oe/recipes-support
parent932a7a618904d1ffca864c59335c173d0852a69e (diff)
downloadmeta-openembedded-dd7c7f11049ecc4eb6cf898059d2dca2766c8408.tar.gz
ntp 4.2.6p3: add native systemd support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/ntp/files/ntpd.service12
-rw-r--r--meta-oe/recipes-support/ntp/ntp.inc4
-rw-r--r--meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb29
3 files changed, 37 insertions, 8 deletions
diff --git a/meta-oe/recipes-support/ntp/files/ntpd.service b/meta-oe/recipes-support/ntp/files/ntpd.service
new file mode 100644
index 000000000..420a0563a
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/ntpd.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Network Time Service
3After=network.target
4
5[Service]
6Type=forking
7PIDFile=/run/ntpd.pid
8EnvironmentFile=/etc/ntp.conf
9ExecStart=/usr/bin/ntpd $NTPD_ARGS -p /run/ntpd.pid
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta-oe/recipes-support/ntp/ntp.inc b/meta-oe/recipes-support/ntp/ntp.inc
index 3dc7bdf43..b398b801e 100644
--- a/meta-oe/recipes-support/ntp/ntp.inc
+++ b/meta-oe/recipes-support/ntp/ntp.inc
@@ -12,7 +12,9 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
12 file://ipv6only-workaround.patch \ 12 file://ipv6only-workaround.patch \
13 file://ntpd \ 13 file://ntpd \
14 file://ntp.conf \ 14 file://ntp.conf \
15 file://ntpdate" 15 file://ntpdate \
16 file://ntpd.service \
17"
16 18
17inherit autotools update-rc.d 19inherit autotools update-rc.d
18 20
diff --git a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
index 590eed15a..e2bb1a806 100644
--- a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
+++ b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
@@ -1,13 +1,20 @@
1require ntp.inc 1require ntp.inc
2 2
3PR = "r2" 3PR = "r3"
4
5inherit systemd
6
7SYSTEMD_PACKAGES = "${PN}-systemd"
8SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
4 9
5SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ 10SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
6 file://tickadj.c.patch \ 11 file://tickadj.c.patch \
7 file://ntp-4.2.4_p6-nano.patch \ 12 file://ntp-4.2.4_p6-nano.patch \
8 file://ntpd \ 13 file://ntpd \
9 file://ntp.conf \ 14 file://ntp.conf \
10 file://ntpdate" 15 file://ntpdate \
16 file://ntpd.service \
17"
11 18
12SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2" 19SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
13SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e" 20SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e"
@@ -15,13 +22,21 @@ SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85
15EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd" 22EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd"
16 23
17do_install_append() { 24do_install_append() {
18 install -d ${D}/${sysconfdir}/init.d 25 install -d ${D}/${sysconfdir}/init.d
19 install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} 26 install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
20 install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d 27 install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
21 install -d ${D}/${sysconfdir}/network/if-up.d 28 install -d ${D}/${sysconfdir}/network/if-up.d
22 install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d 29 install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
30
31 install -d ${D}${base_libdir}/systemd/system
32 install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/
23} 33}
24 34
35PACKAGES =+ "${PN}-systemd"
36
37FILES_${PN}-systemd = "${base_libdir}/systemd/system/"
38RDEPENDS_${PN}-systemd = "${PN}"
39
25FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" 40FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
26FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" 41FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
27FILES_${PN}-tickadj = "${bindir}/tickadj" 42FILES_${PN}-tickadj = "${bindir}/tickadj"