xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Small Footprint CIM Broker"
2*4882a593SmuzhiyunDESCRIPTION = "\
3*4882a593SmuzhiyunSmall Footprint CIM Broker (sfcb) is a CIM server conforming to the CIM \
4*4882a593SmuzhiyunOperations over HTTP protocol. It is robust, with low resource consumption \
5*4882a593Smuzhiyunand therefore specifically suited for embedded and resource constrained \
6*4882a593Smuzhiyunenvironments. sfcb supports providers written against the Common \
7*4882a593SmuzhiyunManageability Programming Interface (CMPI)."
8*4882a593SmuzhiyunHOMEPAGE = "http://www.sblim.org"
9*4882a593SmuzhiyunSECTION = "Applications/System"
10*4882a593SmuzhiyunLICENSE = "EPL-1.0"
11*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261"
12*4882a593SmuzhiyunDEPENDS = "curl libpam openssl sblim-sfc-common unzip-native"
13*4882a593Smuzhiyun
14*4882a593Smuzhiyuninherit features_check
15*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "pam"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunSRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
18*4882a593Smuzhiyun           file://sfcb.service \
19*4882a593Smuzhiyun           file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \
20*4882a593Smuzhiyun           file://sblim-sfcb-1.3.15-fix-provider-debugging.patch \
21*4882a593Smuzhiyun           file://sblim-sfcb-1.3.16-maxMsgLen.patch \
22*4882a593Smuzhiyun           file://sblim-sfcb-1.4.5-service.patch \
23*4882a593Smuzhiyun           file://sblim-sfcb-1.3.16-multilib-man-cfg.patch \
24*4882a593Smuzhiyun           file://sblim-sfcb-1.4.8-default-ecdh-curve-name.patch \
25*4882a593Smuzhiyun           file://sblim-sfcb-1.4.9-fix-ftbfs.patch \
26*4882a593Smuzhiyun           file://0001-include-stdint.h-system-header-for-UINT16_MAX.patch \
27*4882a593Smuzhiyun           file://0001-Replace-need-for-error.h-when-it-does-not-exist.patch \
28*4882a593Smuzhiyun           file://sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch \
29*4882a593Smuzhiyun           file://0001-Avoid-variable-definition-in-header-files.patch \
30*4882a593Smuzhiyun"
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunSRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
33*4882a593SmuzhiyunSRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunCVE_CHECK_IGNORE += "\
36*4882a593Smuzhiyun    CVE-2012-3381 \
37*4882a593Smuzhiyun"
38*4882a593Smuzhiyun
39*4882a593Smuzhiyuninherit autotools
40*4882a593Smuzhiyuninherit systemd
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunSYSTEMD_PACKAGES = "${PN}"
43*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "sblim-sfcb.service"
44*4882a593SmuzhiyunSYSTEMD_AUTO_ENABLE = "enable"
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunLDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunEXTRA_OECONF = '--enable-debug \
49*4882a593Smuzhiyun                --enable-ssl \
50*4882a593Smuzhiyun                --enable-pam \
51*4882a593Smuzhiyun                --enable-ipv6 \
52*4882a593Smuzhiyun                CFLAGS="${CFLAGS} -D_GNU_SOURCE"'
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun# make all with -j option is unsafe.
55*4882a593SmuzhiyunPARALLEL_MAKE = ""
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunINSANE_SKIP:${PN} = "dev-so"
58*4882a593SmuzhiyunCONFIG_SITE = "${WORKDIR}/config-site.${P}"
59*4882a593Smuzhiyun
60*4882a593Smuzhiyundo_install() {
61*4882a593Smuzhiyun    cp -f ${S}/sfcb.cfg.pre.in ${S}/sfcb.cfg
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun    oe_runmake DESTDIR=${D} install
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun    install -d ${D}${systemd_unitdir}/system
66*4882a593Smuzhiyun    install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun    install -d ${D}${sysconfdir}/init.d
69*4882a593Smuzhiyun    mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb
70*4882a593Smuzhiyun    sed -i -e 's/\/var\/lock\/subsys\/sfcb/\/var\/lock\/subsys\/sblim-sfcb/g' ${D}${sysconfdir}/init.d/sblim-sfcb
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun    rm -rf ${D}${libdir}/sfcb/*.la
73*4882a593Smuzhiyun}
74*4882a593Smuzhiyun
75*4882a593Smuzhiyunpkg_postinst:${PN} () {
76*4882a593Smuzhiyun    $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
77*4882a593Smuzhiyun}
78*4882a593Smuzhiyun
79*4882a593Smuzhiyunpkg_postinst_ontarget:${PN} () {
80*4882a593Smuzhiyun    ${datadir}/sfcb/genSslCert.sh ${sysconfdir}/sfcb
81*4882a593Smuzhiyun    ${bindir}/sfcbrepos -f
82*4882a593Smuzhiyun}
83*4882a593Smuzhiyun
84*4882a593SmuzhiyunFILES:${PN} += "${libdir}/sfcb ${datadir}/sfcb"
85*4882a593SmuzhiyunFILES:${PN}-dbg += "${libdir}/sfcb/.debug"
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunRDEPENDS:${PN} = "perl bash"
88