[oe] [meta-oe][PATCH] Install a systemd unit into ${systemd_unitdir} only with systemd in DISTRO_FEATURES
Chunrong Guo
B40290 at freescale.com
Fri Jul 5 07:40:48 UTC 2013
Signed-off-by: Chunrong Guo <B40290 at freescale.com>
---
meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb | 8 +++++---
meta-oe/recipes-extended/zram/zram_0.1.bb | 8 +++++---
meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb | 10 ++++++----
3 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb b/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb
index 3300fd2..45498a8 100644
--- a/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb
+++ b/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://c9.io"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4784c3bcff601fd8f9515f52a11e7018"
-PR = "r4"
+PR = "r5"
# Nodejs-native for node-waf, nodejs4-native for the headers
DEPENDS = "libxml2 nodejs-native nodejs4-native"
@@ -101,8 +101,10 @@ do_install () {
install -m 0755 -d ${D}${sysconfdir}/avahi/services/
install -m 0644 ${WORKDIR}/cloud9-avahi.service ${D}${sysconfdir}/avahi/services/
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/cloud9.service ${D}${systemd_unitdir}/system
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cloud9.service ${D}${systemd_unitdir}/system
+ fi
}
FILES_${PN}-dbg += "${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/.debug \
diff --git a/meta-oe/recipes-extended/zram/zram_0.1.bb b/meta-oe/recipes-extended/zram/zram_0.1.bb
index fbeb586..b871bc7 100644
--- a/meta-oe/recipes-extended/zram/zram_0.1.bb
+++ b/meta-oe/recipes-extended/zram/zram_0.1.bb
@@ -6,7 +6,7 @@ inherit allarch update-rc.d systemd
RDEPENDS_${PN} = "util-linux-swaponoff kmod kernel-module-zram"
-PR = "r3"
+PR = "r4"
SRC_URI = " \
file://init \
@@ -18,8 +18,10 @@ do_install () {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
+ fi
}
FILES_${PN} = "${sysconfdir}/init.d"
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb
index b0d5a79..3e7844d 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb
@@ -7,7 +7,7 @@ PROVIDES = "virtual/gpsd"
EXTRANATIVEPATH += "chrpath-native"
-PR = "r7"
+PR = "r8"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
@@ -82,9 +82,11 @@ do_install_append() {
install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
#support for systemd
- install -d ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
- install -m 0644 ${S}/systemd/${PN}.socket ${D}${systemd_unitdir}/system/${PN}.socket
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
+ install -m 0644 ${S}/systemd/${PN}.socket ${D}${systemd_unitdir}/system/${PN}.socket
+ fi
}
pkg_postinst_${PN}-conf() {
--
1.7.5.4
More information about the Openembedded-devel
mailing list