1SUMMARY = "Small Footprint CIM Broker"
2DESCRIPTION = "\
3Small Footprint CIM Broker (sfcb) is a CIM server conforming to the CIM \
4Operations over HTTP protocol. It is robust, with low resource consumption \
5and therefore specifically suited for embedded and resource constrained \
6environments. sfcb supports providers written against the Common \
7Manageability Programming Interface (CMPI)."
8HOMEPAGE = "http://www.sblim.org"
9SECTION = "Applications/System"
10LICENSE = "EPL-1.0"
11LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261"
12DEPENDS = "curl libpam openssl sblim-sfc-common unzip-native"
13
14inherit features_check
15REQUIRED_DISTRO_FEATURES = "pam"
16
17SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
18           file://sfcb.service \
19           file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \
20           file://sblim-sfcb-1.3.15-fix-provider-debugging.patch \
21           file://sblim-sfcb-1.3.16-maxMsgLen.patch \
22           file://sblim-sfcb-1.4.5-service.patch \
23           file://sblim-sfcb-1.3.16-multilib-man-cfg.patch \
24           file://sblim-sfcb-1.4.8-default-ecdh-curve-name.patch \
25           file://sblim-sfcb-1.4.9-fix-ftbfs.patch \
26           file://0001-include-stdint.h-system-header-for-UINT16_MAX.patch \
27           file://0001-Replace-need-for-error.h-when-it-does-not-exist.patch \
28           file://sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch \
29           file://0001-Avoid-variable-definition-in-header-files.patch \
30           file://0001-configure-Check-for-function-from-respective-library.patch \
31           file://0001-include-missing-system-headers.patch \
32"
33
34SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
35SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
36
37CVE_STATUS[CVE-2012-3381] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
38
39inherit autotools
40inherit systemd
41
42SYSTEMD_PACKAGES = "${PN}"
43SYSTEMD_SERVICE:${PN} = "sblim-sfcb.service"
44SYSTEMD_AUTO_ENABLE = "enable"
45
46LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
47LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--allow-shlib-undefined ', '', d)}"
48
49EXTRA_OECONF = '--enable-debug \
50                --enable-ssl \
51                --enable-pam \
52                --enable-ipv6 \
53                CFLAGS="${CFLAGS} -D_GNU_SOURCE"'
54
55# make all with -j option is unsafe.
56PARALLEL_MAKE = ""
57
58INSANE_SKIP:${PN} = "dev-so"
59CONFIG_SITE = "${WORKDIR}/config-site.${P}"
60
61do_install() {
62    cp -f ${S}/sfcb.cfg.pre.in ${S}/sfcb.cfg
63
64    oe_runmake DESTDIR=${D} install
65
66    install -d ${D}${systemd_unitdir}/system
67    install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
68
69    install -d ${D}${sysconfdir}/init.d
70    mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb
71    sed -i -e 's/\/var\/lock\/subsys\/sfcb/\/var\/lock\/subsys\/sblim-sfcb/g' ${D}${sysconfdir}/init.d/sblim-sfcb
72
73    rm -rf ${D}${libdir}/sfcb/*.la
74}
75
76pkg_postinst:${PN} () {
77    $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
78}
79
80pkg_postinst_ontarget:${PN} () {
81    ${datadir}/sfcb/genSslCert.sh ${sysconfdir}/sfcb
82    ${bindir}/sfcbrepos -f
83}
84
85FILES:${PN} += "${libdir}/sfcb ${datadir}/sfcb"
86FILES:${PN}-dbg += "${libdir}/sfcb/.debug"
87
88RDEPENDS:${PN} = "perl bash"
89