blob: c6b9f1019b474344e1260ec2bd70343442d23d0b [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "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
14SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015 file://sfcb.service \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050016 file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \
17 file://sblim-sfcb-1.3.15-fix-provider-debugging.patch \
18 file://sblim-sfcb-1.3.16-maxMsgLen.patch \
19 file://sblim-sfcb-1.4.5-service.patch \
20 file://sblim-sfcb-1.3.16-multilib-man-cfg.patch \
21 file://sblim-sfcb-1.4.8-default-ecdh-curve-name.patch \
22 file://sblim-sfcb-1.4.9-fix-ftbfs.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023 file://0001-include-stdint.h-system-header-for-UINT16_MAX.patch \
24 file://0001-Replace-need-for-error.h-when-it-does-not-exist.patch \
25"
Patrick Williamsddad1a12017-02-23 20:36:32 -060026
Patrick Williamsb48b7b42016-08-17 15:04:38 -050027SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
28SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
29
30inherit autotools
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031inherit ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050032
33SYSTEMD_PACKAGES = "${PN}"
34SYSTEMD_SERVICE_${PN} = "sblim-sfcb.service"
35SYSTEMD_AUTO_ENABLE = "enable"
36
37LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
38
39EXTRA_OECONF = '--enable-debug \
40 --enable-ssl \
41 --enable-pam \
42 --enable-ipv6 \
43 CFLAGS="${CFLAGS} -D_GNU_SOURCE"'
44
45# make all with -j option is unsafe.
46PARALLEL_MAKE = ""
47
48INSANE_SKIP_${PN} = "dev-so"
49CONFIG_SITE = "${WORKDIR}/config-site.${P}"
50
51do_install() {
52 cp -f ${S}/sfcb.cfg.pre.in ${S}/sfcb.cfg
53
54 oe_runmake DESTDIR=${D} install
55
56 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
57 install -d ${D}${systemd_unitdir}/system
58 install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
59 fi
60
61 install -d ${D}${sysconfdir}/init.d
62 mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb
63 sed -i -e 's/\/var\/lock\/subsys\/sfcb/\/var\/lock\/subsys\/sblim-sfcb/g' ${D}${sysconfdir}/init.d/sblim-sfcb
Patrick Williamsddad1a12017-02-23 20:36:32 -060064
Patrick Williamsb48b7b42016-08-17 15:04:38 -050065 rm -rf ${D}${libdir}/sfcb/*.la
66}
67
68pkg_postinst_${PN} () {
69 OPTS=""
70
71 if [ x"$D" != "x" ]; then
72 OPTS="--root=$D"
73 if type systemctl >/dev/null 2>/dev/null; then
74 systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
75 fi
76 exit 1
77 fi
78
79 ${datadir}/sfcb/genSslCert.sh ${sysconfdir}/sfcb
80 ${bindir}/sfcbrepos -f
81}
82
83FILES_${PN} += "${libdir}/sfcb ${datadir}/sfcb"
84FILES_${PN}-dbg += "${libdir}/sfcb/.debug"
85
86RDEPENDS_${PN} = "perl bash"