blob: f1aedc4def2c8516b3981aba27e4113c33043ac9 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
2DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
3middleware consistent with Service Availability Forum (SA Forum) \
4specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
5established by leading Communications and Enterprise Computing Companies to \
6facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
7code base in commercial products. \
8The OpenSAF project was launched in mid 2007 and has been under development by \
9an informal group of supporters of the OpenSAF initiative. The OpenSAF \
10Foundation was founded on January 22nd 2008 with Emerson Network Power, \
11Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
12HOMEPAGE = "http://www.opensaf.org"
13SECTION = "admin"
14LICENSE = "LGPLv2.1"
15LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
16
17DEPENDS = "libxml2 python"
18TOOLCHAIN = "gcc"
19
20SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
21
22SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
23 file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
24 file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
25 file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
26 file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
27 file://0001-Catch-std-ifstream-failure-by-reference.patch \
28 file://0002-Fix-format-truncation-errors.patch \
29 file://0001-Fix-string-overflow-in-snprintf.patch \
30 file://0008-check-for-size-before-using-strncpy.patch \
31 "
32SRC_URI[md5sum] = "45044fde0b35eac057a5fa05c27b8040"
33SRC_URI[sha256sum] = "230a0ea628ba278170a913746c39b2c8cd529d7dc25326b2e17b5c095cf94025"
34
35inherit autotools useradd systemd pkgconfig
36
37USERADD_PACKAGES = "${PN}"
38GROUPADD_PARAM_${PN} = "-f -r opensaf"
39USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
40
41SYSTEMD_SERVICE_${PN} += "opensafd.service"
42SYSTEMD_AUTO_ENABLE = "disable"
43
44PACKAGECONFIG[systemd] = ",,systemd"
45PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi"
46PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
47
48PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
49
50PKGLIBDIR="${libdir}"
51CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation"
52CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation="
53LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
54
55do_install_append() {
56 cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
57 rm -fr "${D}${localstatedir}/lock"
58 rm -fr "${D}${localstatedir}/run"
59 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
60 rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
61 if [ ! -d "${D}${sysconfdir}/init.d" ]; then
62 install -d ${D}${sysconfdir}/init.d
63 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
64 fi
65}
66
67FILES_${PN} += "${systemd_unitdir}/system/*.service"
68FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
69
70INSANE_SKIP_${PN} = "dev-so"
71
72RDEPENDS_${PN} += "bash python"
73
74# http://errors.yoctoproject.org/Errors/Details/186970/
75EXCLUDE_FROM_WORLD_libc-musl = "1"