Patchwork [meta-networking] Install a systemd unit into ${systemd_unitdir} only with systemd in DISTRO_FEATURES

login
register
mail settings
Submitter chunrong guo
Date July 5, 2013, 5:29 a.m.
Message ID <1373002142-5129-1-git-send-email-B40290@freescale.com>
Download mbox | patch
Permalink /patch/53099/
State Rejected, archived
Headers show

Comments

chunrong guo - July 5, 2013, 5:29 a.m.
Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 .../recipes-protocols/net-snmp/net-snmp_5.7.2.bb   |   11 +++++++----
 .../recipes-support/dnsmasq/dnsmasq.inc            |    5 ++++-
 .../recipes-support/nis/yp-tools_2.12.bb           |    8 +++++---
 .../recipes-support/nis/ypbind-mt_1.36.bb          |    8 +++++---
 meta-networking/recipes-support/ntp/ntp.inc        |   12 +++++++-----
 5 files changed, 28 insertions(+), 16 deletions(-)

Patch

diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb
index d21995a..2eece50 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb
@@ -6,7 +6,7 @@  LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5
 
 DEPENDS = "openssl libnl pciutils"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
         file://init \
@@ -51,9 +51,12 @@  do_install_append() {
         -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
         -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
         -i ${STAGING_BINDIR}/net-snmp-config
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/snmptrapd.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}/snmpd.service ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
+    fi
 }
 
 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
index 0f5b273..242f143 100644
--- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
@@ -31,9 +31,11 @@  do_install () {
     install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/
     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
 
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${WORKDIR}/dnsmasq.service ${D}${systemd_unitdir}/system
-
+    fi
+   
     if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != "" ]; then
         install -d ${D}${sysconfdir}/dbus-1/system.d
         install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/
@@ -46,3 +48,4 @@  RPROVIDES_${PN} += "${PN}-systemd"
 RREPLACES_${PN} += "${PN}-systemd"
 RCONFLICTS_${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "dnsmasq.service"
+
diff --git a/meta-networking/recipes-support/nis/yp-tools_2.12.bb b/meta-networking/recipes-support/nis/yp-tools_2.12.bb
index 0017845..65c4429 100644
--- a/meta-networking/recipes-support/nis/yp-tools_2.12.bb
+++ b/meta-networking/recipes-support/nis/yp-tools_2.12.bb
@@ -1,7 +1,7 @@ 
 # This package builds tools to manage NIS
 # The source package is utils/net/NIS/yp-tools
 #
-PR = "r3"
+PR = "r4"
 DESCRIPTION="\
 Network Information Service tools.  \
 This package contains ypcat, ypmatch, ypset, \
@@ -26,6 +26,8 @@  RCONFLICTS_${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "domainname.service"
 
 do_install_append() {
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/domainname.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}/domainname.service ${D}${systemd_unitdir}/system
+    fi
 }
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb
index 35ef16a..85ecaf8 100644
--- a/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb
+++ b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb
@@ -1,7 +1,7 @@ 
 # This package builds the NIS ypbind daemon
 # The source package is utils/net/NIS/ypbind-mt
 #
-PR = "r3"
+PR = "r4"
 DESCRIPTION="\
 Multithreaded NIS bind service (ypbind-mt).  \
 ypbind-mt is a complete new implementation of a NIS \
@@ -40,8 +40,10 @@  do_install_append () {
     # TODO, use update-rc.d
     ln -s ../init.d/ypbind ${D}${sysconfdir}/rcS.d/S44ypbind
 
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/ypbind.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}/ypbind.service ${D}${systemd_unitdir}/system
+    fi
 }
 
 inherit systemd
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index 79e7401..6006aeb 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -8,7 +8,7 @@  SECTION = "console/network"
 LICENSE = "NTP"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670"
 
-INC_PR = "r6"
+INC_PR = "r7"
 
 SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
            file://tickadj.c.patch \
@@ -59,10 +59,12 @@  do_install_append() {
     install -d ${D}/${sysconfdir}/network/if-up.d
     ln -s ${bindir}/ntpdate-sync ${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/
-    install -m 0644 ${WORKDIR}/sntp.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}/ntpdate.service ${D}${systemd_unitdir}/system/
+        install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
+        install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
+    fi
 }
 
 PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"