blob: caa85e040a7c17494b15145ba1ef51326dac8368 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -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
Andrew Geissler82c905d2020-04-13 13:39:40 -050017DEPENDS = "libxml2 python3"
Brad Bishopc342db32019-05-15 21:57:59 -040018TOOLCHAIN = "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 \
Brad Bishop36a3e3e2019-10-02 13:29:27 -040027 file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 file://0001-immom_python-convert-to-python3.patch \
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050029 file://0001-Fix-build-with-fno-common.patch \
Andrew Geissler4b7c1152020-11-30 19:55:29 -060030 file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \
Brad Bishopc342db32019-05-15 21:57:59 -040031 "
Andrew Geissler69721092021-07-23 12:57:00 -040032SRC_URI[md5sum] = "a60775787ba520a0b1031fcd42e0d65b"
33SRC_URI[sha256sum] = "d29d124506e4b084285d27c8742c7bca66de80be6a0ba9de8e37835ccaa8ee57"
Brad Bishopc342db32019-05-15 21:57:59 -040034
Andrew Geissler82c905d2020-04-13 13:39:40 -050035UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases"
36
Brad Bishopc342db32019-05-15 21:57:59 -040037inherit autotools useradd systemd pkgconfig
38
39USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050040GROUPADD_PARAM:${PN} = "-f -r opensaf"
41USERADD_PARAM:${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
Brad Bishopc342db32019-05-15 21:57:59 -040042
Patrick Williams213cb262021-08-07 19:21:33 -050043SYSTEMD_SERVICE:${PN} += "opensafd.service"
Brad Bishopc342db32019-05-15 21:57:59 -040044SYSTEMD_AUTO_ENABLE = "disable"
45
46PACKAGECONFIG[systemd] = ",,systemd"
47PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi"
48PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
49
50PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
51
Brad Bishopc342db32019-05-15 21:57:59 -040052CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation"
53CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation="
54LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
55
Patrick Williams213cb262021-08-07 19:21:33 -050056do_install:append() {
Brad Bishopc342db32019-05-15 21:57:59 -040057 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
Patrick Williams213cb262021-08-07 19:21:33 -050067FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
68FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
69FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"
Brad Bishopc342db32019-05-15 21:57:59 -040070
Patrick Williams213cb262021-08-07 19:21:33 -050071INSANE_SKIP:${PN} = "dev-so"
Brad Bishopc342db32019-05-15 21:57:59 -040072
Patrick Williams213cb262021-08-07 19:21:33 -050073RDEPENDS:${PN} += "bash python3-core"
Brad Bishopc342db32019-05-15 21:57:59 -040074
75# http://errors.yoctoproject.org/Errors/Details/186970/
Patrick Williams213cb262021-08-07 19:21:33 -050076COMPATIBLE_HOST:libc-musl = 'null'
Brad Bishop36a3e3e2019-10-02 13:29:27 -040077
78FILES_SOLIBSDEV = ""