blob: 10ffaaa31bbbf870711c56742cc3023550560c0c [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
Brad Bishop316dfdd2018-06-25 12:45:53 -040014inherit distro_features_check
15REQUIRED_DISTRO_FEATURES = "pam"
16
Patrick Williamsb48b7b42016-08-17 15:04:38 -050017SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050018 file://sfcb.service \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050019 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 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050026 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"
Patrick Williamsddad1a12017-02-23 20:36:32 -060029
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
31SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
32
33inherit autotools
Brad Bishop316dfdd2018-06-25 12:45:53 -040034inherit systemd
Patrick Williamsb48b7b42016-08-17 15:04:38 -050035
36SYSTEMD_PACKAGES = "${PN}"
37SYSTEMD_SERVICE_${PN} = "sblim-sfcb.service"
38SYSTEMD_AUTO_ENABLE = "enable"
39
40LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
41
42EXTRA_OECONF = '--enable-debug \
43 --enable-ssl \
44 --enable-pam \
45 --enable-ipv6 \
46 CFLAGS="${CFLAGS} -D_GNU_SOURCE"'
47
48# make all with -j option is unsafe.
49PARALLEL_MAKE = ""
50
51INSANE_SKIP_${PN} = "dev-so"
52CONFIG_SITE = "${WORKDIR}/config-site.${P}"
53
54do_install() {
55 cp -f ${S}/sfcb.cfg.pre.in ${S}/sfcb.cfg
56
57 oe_runmake DESTDIR=${D} install
58
Brad Bishop316dfdd2018-06-25 12:45:53 -040059 install -d ${D}${systemd_unitdir}/system
60 install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
Patrick Williamsb48b7b42016-08-17 15:04:38 -050061
62 install -d ${D}${sysconfdir}/init.d
63 mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb
64 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 -060065
Patrick Williamsb48b7b42016-08-17 15:04:38 -050066 rm -rf ${D}${libdir}/sfcb/*.la
67}
68
69pkg_postinst_${PN} () {
70 OPTS=""
71
72 if [ x"$D" != "x" ]; then
73 OPTS="--root=$D"
74 if type systemctl >/dev/null 2>/dev/null; then
75 systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
76 fi
77 exit 1
78 fi
79
80 ${datadir}/sfcb/genSslCert.sh ${sysconfdir}/sfcb
81 ${bindir}/sfcbrepos -f
82}
83
84FILES_${PN} += "${libdir}/sfcb ${datadir}/sfcb"
85FILES_${PN}-dbg += "${libdir}/sfcb/.debug"
86
87RDEPENDS_${PN} = "perl bash"