diff options
author | Ross Burton <ross.burton@intel.com> | 2013-04-29 14:44:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-29 15:31:41 +0100 |
commit | c42cc8fb38aee46f4778b9c68412a47ae5919923 (patch) | |
tree | 8eeb7036232571b498e4a10ae00c88d7ab4b5816 /meta/recipes-connectivity/neard/neard_0.9.bb | |
parent | 9dae6e7be41294601f53adf76d1a0955b58c9cf1 (diff) | |
download | poky-c42cc8fb38aee46f4778b9c68412a47ae5919923.tar.gz |
neard: add systemd unit file
Add a systemd unit file, and respect the sysvinit feature when installing the
init script.
(thanks to Jukka Rissanen for the unit file)
(From OE-Core rev: e86538db13605953465aacc3f2fb7d719dad919e)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/neard/neard_0.9.bb')
-rw-r--r-- | meta/recipes-connectivity/neard/neard_0.9.bb | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/meta/recipes-connectivity/neard/neard_0.9.bb b/meta/recipes-connectivity/neard/neard_0.9.bb index 2c4acb3ebf..dc43f7e315 100644 --- a/meta/recipes-connectivity/neard/neard_0.9.bb +++ b/meta/recipes-connectivity/neard/neard_0.9.bb | |||
@@ -7,6 +7,7 @@ DEPENDS = "dbus glib-2.0 libnl" | |||
7 | 7 | ||
8 | SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=git \ | 8 | SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=git \ |
9 | file://neard.in \ | 9 | file://neard.in \ |
10 | file://neard.service.in \ | ||
10 | " | 11 | " |
11 | 12 | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ |
@@ -18,7 +19,7 @@ SRCREV = "eb486bf35e24d7d1db61350f5ab393a0c880523d" | |||
18 | PV = "0.10+git${SRCPV}" | 19 | PV = "0.10+git${SRCPV}" |
19 | PR = "r0" | 20 | PR = "r0" |
20 | 21 | ||
21 | inherit autotools pkgconfig update-rc.d | 22 | inherit autotools pkgconfig systemd update-rc.d |
22 | 23 | ||
23 | EXTRA_OECONF += "--enable-tools" | 24 | EXTRA_OECONF += "--enable-tools" |
24 | 25 | ||
@@ -28,15 +29,20 @@ do_install() { | |||
28 | 29 | ||
29 | # This would copy neard start-stop shell and test scripts | 30 | # This would copy neard start-stop shell and test scripts |
30 | do_install_append() { | 31 | do_install_append() { |
31 | # start/stop | 32 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
32 | install -d ${D}${sysconfdir}/init.d/ | 33 | install -d ${D}${sysconfdir}/init.d/ |
33 | 34 | sed "s:@installpath@:${libexecdir}:" ${WORKDIR}/neard.in \ | |
34 | sed "s:@installpath@:${libexecdir}:" ${WORKDIR}/neard.in \ | 35 | > ${D}${sysconfdir}/init.d/neard |
35 | > ${D}${sysconfdir}/init.d/neard | 36 | chmod 0755 ${D}${sysconfdir}/init.d/neard |
36 | 37 | fi | |
37 | chmod 0755 ${D}${sysconfdir}/init.d/neard | 38 | |
38 | 39 | if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | |
39 | #test files | 40 | install -d ${D}${systemd_unitdir}/system |
41 | sed "s:@installpath@:${libexecdir}:" ${WORKDIR}/neard.service.in \ | ||
42 | > ${D}${systemd_unitdir}/system/neard.service | ||
43 | fi | ||
44 | |||
45 | # Install the tests for neard-tests | ||
40 | install -d ${D}${libdir}/neard | 46 | install -d ${D}${libdir}/neard |
41 | install -m 0755 ${S}/test/* ${D}${libdir}/${BPN}/ | 47 | install -m 0755 ${S}/test/* ${D}${libdir}/${BPN}/ |
42 | install -m 0755 ${S}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/ | 48 | install -m 0755 ${S}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/ |
@@ -59,3 +65,5 @@ RDEPENDS_${PN}-tests = "python python-dbus python-pygobject" | |||
59 | 65 | ||
60 | INITSCRIPT_NAME = "neard" | 66 | INITSCRIPT_NAME = "neard" |
61 | INITSCRIPT_PARAMS = "defaults 64" | 67 | INITSCRIPT_PARAMS = "defaults 64" |
68 | |||
69 | SYSTEMD_SERVICE_${PN} = "neard.service" | ||