[oe-commits] Li xin : sblim-sfcb: add new recipe

git at git.openembedded.org git at git.openembedded.org
Mon Dec 1 13:29:12 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: 22f26cf7d770bab76b08378522073021717c64be
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=22f26cf7d770bab76b08378522073021717c64be

Author: Li xin <lixin.fnst at cn.fujitsu.com>
Date:   Mon Nov 17 19:00:06 2014 +0800

sblim-sfcb: add new recipe

Sfcb(Small Footprint CIM Broker)is a CIM server conforming to the
CIM Operations over HTTP protocol.
It is robust, with low resource consumption and therefore specifically
suited for embedded and resource constrained environments.
sfcb supports providers written against the Common Manageability
Programming Interface (CMPI).

Signed-off-by: Li Xin <lixin.fnst at cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../recipes-extended/sblim-sfcb/files/sfcb.service |  11 +++
 ...000sblim-sfcb-disable_auto_service_start1.patch |  19 +++++
 .../sblim-sfcb-1.3.4/cimv217Final-MOFs.zip.org     | Bin 0 -> 1259176 bytes
 .../sblim-sfcb-1.3.4/config-site.sblim-sfcb-1.3.4  |   2 +
 .../sblim-sfcb/sblim-sfcb_1.3.4.bb                 |  83 +++++++++++++++++++++
 5 files changed, 115 insertions(+)

diff --git a/meta-oe/recipes-extended/sblim-sfcb/files/sfcb.service b/meta-oe/recipes-extended/sblim-sfcb/files/sfcb.service
new file mode 100644
index 0000000..5adf63c
--- /dev/null
+++ b/meta-oe/recipes-extended/sblim-sfcb/files/sfcb.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Small Footprint CIM Broker Service
+After=syslog.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/sfcbd -d
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/1000sblim-sfcb-disable_auto_service_start1.patch b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/1000sblim-sfcb-disable_auto_service_start1.patch
new file mode 100644
index 0000000..c2e029f
--- /dev/null
+++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/1000sblim-sfcb-disable_auto_service_start1.patch
@@ -0,0 +1,19 @@
+*** /root/rpmbuild/SOURCES/sblim-sfcb-1.3.4.orig/sfcb.init-redhat.in	2005-06-13 18:20:33.000000000 +0530
+--- sblim-sfcb-1.3.4.modified/sfcb.init-redhat.in	2009-09-03 19:59:01.000000000 +0530
+***************
+*** 2,8 ****
+  #
+  # $Id: sfcb.init-redhat.in,v 1.2 2005/06/13 12:50:33 mihajlov Exp $
+  #
+! # chkconfig: 35 20 80
+  #
+  # description: Small Footprint CIM Broker Service
+  #
+--- 2,8 ----
+  #
+  # $Id: sfcb.init-redhat.in,v 1.2 2005/06/13 12:50:33 mihajlov Exp $
+  #
+! # chkconfig: - 20 80
+  #
+  # description: Small Footprint CIM Broker Service
+  #
diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/cimv217Final-MOFs.zip.org b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/cimv217Final-MOFs.zip.org
new file mode 100644
index 0000000..9acc443
Binary files /dev/null and b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/cimv217Final-MOFs.zip.org differ
diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/config-site.sblim-sfcb-1.3.4 b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/config-site.sblim-sfcb-1.3.4
new file mode 100644
index 0000000..0ce838e
--- /dev/null
+++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.3.4/config-site.sblim-sfcb-1.3.4
@@ -0,0 +1,2 @@
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_realloc_0_nonnull=yes
diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.3.4.bb b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.3.4.bb
new file mode 100644
index 0000000..b7f29bc
--- /dev/null
+++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.3.4.bb
@@ -0,0 +1,83 @@
+SUMMARY = "Small Footprint CIM Broker"
+DESCRIPTION = "Small Footprint CIM Broker (sfcb) is a CIM server conforming to the \
+CIM Operations over HTTP protocol. \
+It is robust, with low resource consumption and therefore specifically \
+suited for embedded and resource constrained environments. \
+sfcb supports providers written against the Common Manageability \
+Programming Interface (CMPI)."
+HOMEPAGE = "http://www.sblim.org"
+SECTION = "Applications/System"
+
+inherit autotools
+
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${PN}/${PN}-${PV}.tar.bz2/486fe536ad5ac5c58dd60ea03fc1bb21/${PN}-${PV}.tar.bz2 \
+           file://1000sblim-sfcb-disable_auto_service_start1.patch \
+	   file://config-site.${P} \
+	   file://cimv217Final-MOFs.zip.org \
+	   file://sfcb.service \
+	   "
+
+SRC_URI[md5sum] = "486fe536ad5ac5c58dd60ea03fc1bb21"
+SRC_URI[sha256sum] = "e48253208034218f95e5c7076af6c1f6a533595df2f6cafc073173f8ac54ff02"
+
+LICENSE = "EPL-1.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261"
+
+inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "sblim-sfcb.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+EXTRA_OECONF = '--enable-debug \
+      	        --enable-ssl \
+		--enable-pam \
+		--enable-ipv6 \
+		CFLAGS="${CFLAGS} -D_GNU_SOURCE" \
+	       '
+
+DEPENDS = "curl libpam openssl"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+FILES_${PN} += "${libdir}/sfcb \
+	        ${datadir}/sfcb \
+	       "
+
+FILES_${PN}-dbg += "${libdir}/sfcb/.debug"
+
+# make all with -j option is unsafe.
+PARALLEL_MAKE = ""
+
+CONFIG_SITE="${WORKDIR}/config-site.${P}"
+
+do_install() {
+	oe_runmake DESTDIR=${D} install
+	
+	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+	    install -d ${D}${systemd_unitdir}/system
+    	install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
+	fi 
+
+        install -d ${D}/etc/init.d
+	mv ${D}/etc/init.d/sfcb ${D}/etc/init.d/sblim-sfcb
+	sed -i -e 's/\/var\/lock\/subsys\/sfcb/\/var\/lock\/subsys\/sblim-sfcb/g' ${D}/etc/init.d/sblim-sfcb
+	rm -rf ${D}/${libdir}/sfcb/*.la
+
+	export CIMSCHEMA_SOURCE="${WORKDIR}/cimv217Final-MOFs.zip.org"
+	${D}${datadir}/sfcb/getSchema.sh -f ${D}/${datadir}/sfcb
+	export CIMSCHEMA_SOURCE=""
+}
+
+pkg_postinst_${PN} () {
+	OPTS=""
+
+	if [ x"$D" != "x" ]; then
+		OPTS="--root=$D"
+		if type systemctl >/dev/null 2>/dev/null; then
+			systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
+		fi
+		exit 1
+	fi
+	${datadir}/sfcb/genSslCert.sh /etc/sfcb
+	${bindir}/sfcbrepos -f 
+}



More information about the Openembedded-commits mailing list