From ab9e4afa3a10a5ee86ad9a2480a7aa8571ae858c Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 24 Jul 2017 17:40:21 +0200 Subject: [PATCH] gpsdate: use systemd.bbclass Also update SRCREV to one commit forward, which fixes installing the service file when using systemctl enable (which OE uses). --- recipes-extra/gpsdate/gpsdate_git.bb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/recipes-extra/gpsdate/gpsdate_git.bb b/recipes-extra/gpsdate/gpsdate_git.bb index 39d0ebc..df516fe 100644 --- a/recipes-extra/gpsdate/gpsdate_git.bb +++ b/recipes-extra/gpsdate/gpsdate_git.bb @@ -12,13 +12,15 @@ PV = "0.2+git${SRCPV}" SRC_URI = "git://git.sysmocom.de/gpsdate.git;branch=master \ file://gpsdate.default \ " -SRCREV = "81690ca78e816f86e0da11bbe8cba725fa1a634d" +SRCREV = "cd7b77ef311f317aac7a067308a94e46811a20f2" S = "${WORKDIR}/git" INITSCRIPT_NAME = "gpsdate" INITSCRIPT_PARAMS = "defaults 35" -inherit update-rc.d +inherit update-rc.d systemd + +SYSTEMD_SERVICE_${PN} = "${PN}.service" do_install() { install -d ${D}/${sbindir} @@ -28,17 +30,12 @@ do_install() { install -m 0755 ${S}/gpsdate.init ${D}/${sysconfdir}/init.d/gpsdate install -d ${D}${systemd_system_unitdir} - install -d ${D}${systemd_system_unitdir}/multi-user.target.wants/ - install -m 0644 ${S}/gpsdate.service ${D}${systemd_system_unitdir} - ln -sf ../gpsdate.service ${D}${systemd_system_unitdir}/multi-user.target.wants/ install -d ${D}/${sysconfdir}/default install -m 0644 ${WORKDIR}/gpsdate.default ${D}/${sysconfdir}/default/gpsdate } -FILES_${PN} += "${systemd_unitdir}" - PACKAGES =+ "gps-watchdog" FILES_gps-watchdog = "${sbindir}/gps-watchdog"