ntp: move systemd support to meta-systemd
authorAndreas Müller <schnitzeltony@googlemail.com>
Wed, 11 Jul 2012 11:47:00 +0000 (13:47 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:21:30 +0000 (08:21 -0800)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
meta-openembedded/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpd.service [moved from meta-openembedded/meta-oe/recipes-support/ntp/files/ntpd.service with 100% similarity]
meta-openembedded/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service [moved from meta-openembedded/meta-oe/recipes-support/ntp/files/ntpdate.service with 100% similarity]
meta-openembedded/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend [new file with mode: 0644]

index a3d719e..89a272a 100644 (file)
@@ -1,11 +1,6 @@
 require ntp.inc
 
-PR = "r5"
-
-inherit systemd
-
-SYSTEMD_PACKAGES = "${PN}-systemd"
-SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
+PR = "r6"
 
 SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
         file://tickadj.c.patch \
@@ -13,8 +8,6 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g
         file://ntpd \
         file://ntp.conf \
         file://ntpdate \
-        file://ntpdate.service \
-        file://ntpd.service \
 "
 
 SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
@@ -28,17 +21,8 @@ do_install_append() {
        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/
 }
 
-PACKAGES =+ "${PN}-systemd"
-
-FILES_${PN}-systemd = "${systemd_unitdir}/system/"
-RDEPENDS_${PN}-systemd = "${PN}"
-
 FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
 FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
 FILES_${PN}-tickadj = "${bindir}/tickadj"
diff --git a/meta-openembedded/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend b/meta-openembedded/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend
new file mode 100644 (file)
index 0000000..c6cd031
--- /dev/null
@@ -0,0 +1,20 @@
+inherit systemd
+
+PRINC := "${@int(PRINC) + 1}"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SYSTEMD_PACKAGES = "${PN}-systemd ntpdate-systemd"
+SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
+SYSTEMD_SERVICE_ntpdate-systemd = "ntpdate.service"
+
+SRC_URI += " \
+       file://ntpdate.service \
+        file://ntpd.service \
+"
+
+do_install_append() {
+       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/
+}