Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "Small Footprint CIM Broker" |
| 2 | DESCRIPTION = "\ |
| 3 | Small Footprint CIM Broker (sfcb) is a CIM server conforming to the CIM \ |
| 4 | Operations over HTTP protocol. It is robust, with low resource consumption \ |
| 5 | and therefore specifically suited for embedded and resource constrained \ |
| 6 | environments. sfcb supports providers written against the Common \ |
| 7 | Manageability Programming Interface (CMPI)." |
| 8 | HOMEPAGE = "http://www.sblim.org" |
| 9 | SECTION = "Applications/System" |
| 10 | LICENSE = "EPL-1.0" |
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261" |
| 12 | DEPENDS = "curl libpam openssl sblim-sfc-common unzip-native" |
| 13 | |
| 14 | SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \ |
| 15 | file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \ |
| 16 | file://sblim-sfcb-1.3.15-fix-provider-debugging.patch \ |
| 17 | file://sblim-sfcb-1.3.16-maxMsgLen.patch \ |
| 18 | file://sblim-sfcb-1.4.5-service.patch \ |
| 19 | file://sblim-sfcb-1.3.16-multilib-man-cfg.patch \ |
| 20 | file://sblim-sfcb-1.4.8-default-ecdh-curve-name.patch \ |
| 21 | file://sblim-sfcb-1.4.9-fix-ftbfs.patch \ |
| 22 | file://sfcb.service" |
| 23 | |
| 24 | SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30" |
| 25 | SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd" |
| 26 | |
| 27 | inherit autotools |
| 28 | inherit ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} |
| 29 | |
| 30 | SYSTEMD_PACKAGES = "${PN}" |
| 31 | SYSTEMD_SERVICE_${PN} = "sblim-sfcb.service" |
| 32 | SYSTEMD_AUTO_ENABLE = "enable" |
| 33 | |
| 34 | LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" |
| 35 | |
| 36 | EXTRA_OECONF = '--enable-debug \ |
| 37 | --enable-ssl \ |
| 38 | --enable-pam \ |
| 39 | --enable-ipv6 \ |
| 40 | CFLAGS="${CFLAGS} -D_GNU_SOURCE"' |
| 41 | |
| 42 | # make all with -j option is unsafe. |
| 43 | PARALLEL_MAKE = "" |
| 44 | |
| 45 | INSANE_SKIP_${PN} = "dev-so" |
| 46 | CONFIG_SITE = "${WORKDIR}/config-site.${P}" |
| 47 | |
| 48 | do_install() { |
| 49 | cp -f ${S}/sfcb.cfg.pre.in ${S}/sfcb.cfg |
| 50 | |
| 51 | oe_runmake DESTDIR=${D} install |
| 52 | |
| 53 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 54 | install -d ${D}${systemd_unitdir}/system |
| 55 | install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service |
| 56 | fi |
| 57 | |
| 58 | install -d ${D}${sysconfdir}/init.d |
| 59 | mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb |
| 60 | sed -i -e 's/\/var\/lock\/subsys\/sfcb/\/var\/lock\/subsys\/sblim-sfcb/g' ${D}${sysconfdir}/init.d/sblim-sfcb |
| 61 | |
| 62 | rm -rf ${D}${libdir}/sfcb/*.la |
| 63 | } |
| 64 | |
| 65 | pkg_postinst_${PN} () { |
| 66 | OPTS="" |
| 67 | |
| 68 | if [ x"$D" != "x" ]; then |
| 69 | OPTS="--root=$D" |
| 70 | if type systemctl >/dev/null 2>/dev/null; then |
| 71 | systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} |
| 72 | fi |
| 73 | exit 1 |
| 74 | fi |
| 75 | |
| 76 | ${datadir}/sfcb/genSslCert.sh ${sysconfdir}/sfcb |
| 77 | ${bindir}/sfcbrepos -f |
| 78 | } |
| 79 | |
| 80 | FILES_${PN} += "${libdir}/sfcb ${datadir}/sfcb" |
| 81 | FILES_${PN}-dbg += "${libdir}/sfcb/.debug" |
| 82 | |
| 83 | RDEPENDS_${PN} = "perl bash" |