Patchwork [RFC,meta-oe,13/27] net-snmp: move systemd support to meta-systemd

login
register
mail settings
Submitter Andreas Müller
Date June 10, 2012, 9:46 p.m.
Message ID <1339364820-2880-14-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/29611/
State Superseded
Headers show

Comments

Andreas Müller - June 10, 2012, 9:46 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../recipes-extended/net-snmp/net-snmp_5.7.1.bb    |   17 ++---------------
 .../net-snmp/net-snmp}/snmpd.service               |    0
 .../net-snmp/net-snmp}/snmptrapd.service           |    0
 .../net-snmp/net-snmp}/systemd-support.patch       |    0
 .../net-snmp/net-snmp_5.7.1.bbappend               |   19 +++++++++++++++++++
 5 files changed, 21 insertions(+), 15 deletions(-)
 rename {meta-oe/recipes-extended/net-snmp/files => meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp}/snmpd.service (100%)
 rename {meta-oe/recipes-extended/net-snmp/files => meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp}/snmptrapd.service (100%)
 rename {meta-oe/recipes-extended/net-snmp/files => meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp}/systemd-support.patch (100%)
 create mode 100644 meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bbappend

Patch

diff --git a/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bb b/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bb
index 83df80a..f1e42b5 100644
--- a/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bb
+++ b/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bb
@@ -1,28 +1,18 @@ 
 require net-snmp.inc
-inherit systemd
 
-PR = "${INC_PR}.3"
+PR = "${INC_PR}.4"
 LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5a622ea24634e"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
         file://sync-with-5.7-branch.patch \
         file://libnl-3-support.patch \
-        file://systemd-support.patch \
-        file://snmpd.service \
-        file://snmptrapd.service \
         file://init \
         file://snmpd.conf \
         file://snmptrapd.conf"
 
-EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no --with-systemd "
+EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no"
 EXTRA_OEMAKE = "INSTALL_PREFIX=${D}"
 
-SYSTEMD_PACKAGES = "${PN}-server-snmpd-systemd \
-                    ${PN}-server-snmptrapd-systemd"
-
-SYSTEMD_SERVICE_${PN}-server-snmpd-systemd = "snmpd.service"
-SYSTEMD_SERVICE_${PN}-server-snmptrapd-systemd =  "snmptrapd.service"
-
 do_configure_prepend() {
         gnu-configize -f
         # We better change sources and re-autoconf here, but
@@ -37,6 +27,3 @@  CCACHE = ""
 
 SRC_URI[md5sum] = "c95d08fd5d93df0c11a2e1bdf0e01e0b"
 SRC_URI[sha256sum] = "7c71c9650c65b715356547e20ca2dbe6313944278af8cc19c32a5337f46b181f"
-
-RDEPENDS_${PN}-server-snmpd-systemd = "${PN}-server-snmpd"
-RDEPENDS_${PN}-server-snmptrapd-systemd = "${PN}-server-snmptrapd"
diff --git a/meta-oe/recipes-extended/net-snmp/files/snmpd.service b/meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp/snmpd.service
similarity index 100%
rename from meta-oe/recipes-extended/net-snmp/files/snmpd.service
rename to meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp/snmpd.service
diff --git a/meta-oe/recipes-extended/net-snmp/files/snmptrapd.service b/meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp/snmptrapd.service
similarity index 100%
rename from meta-oe/recipes-extended/net-snmp/files/snmptrapd.service
rename to meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp/snmptrapd.service
diff --git a/meta-oe/recipes-extended/net-snmp/files/systemd-support.patch b/meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp/systemd-support.patch
similarity index 100%
rename from meta-oe/recipes-extended/net-snmp/files/systemd-support.patch
rename to meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp/systemd-support.patch
diff --git a/meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bbappend b/meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bbappend
new file mode 100644
index 0000000..a889859
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bbappend
@@ -0,0 +1,19 @@ 
+FILESEXTRAPATHS := "${THISDIR}/${PN}"
+
+PRINC := "${@int(PRINC) + 1}"
+
+inherit systemd
+
+SRC_URI += " \
+        file://systemd-support.patch \
+        file://snmpd.service \
+        file://snmptrapd.service \
+"
+
+EXTRA_OECONF += "--with-systemd"
+
+SYSTEMD_PACKAGES = "${PN}-server-snmpd-systemd \
+                    ${PN}-server-snmptrapd-systemd"
+
+SYSTEMD_SERVICE_${PN}-server-snmpd-systemd = "snmpd.service"
+SYSTEMD_SERVICE_${PN}-server-snmptrapd-systemd =  "snmptrapd.service"