Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1 | SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification" |
| 2 | DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \ |
| 3 | middleware consistent with Service Availability Forum (SA Forum) \ |
| 4 | specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \ |
| 5 | established by leading Communications and Enterprise Computing Companies to \ |
| 6 | facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \ |
| 7 | code base in commercial products. \ |
| 8 | The OpenSAF project was launched in mid 2007 and has been under development by \ |
| 9 | an informal group of supporters of the OpenSAF initiative. The OpenSAF \ |
| 10 | Foundation was founded on January 22nd 2008 with Emerson Network Power, \ |
| 11 | Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members." |
| 12 | HOMEPAGE = "http://www.opensaf.org" |
| 13 | SECTION = "admin" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 14 | LICENSE = "LGPL-2.1-only" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 15 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" |
| 16 | |
| 17 | DEPENDS = "libxml2 python3" |
| 18 | TOOLCHAIN = "gcc" |
| 19 | |
| 20 | SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" |
| 21 | |
| 22 | SRC_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-create_empty_library-Use-CC-variable-intead-of-hardc.patch \ |
| 28 | file://0001-immom_python-convert-to-python3.patch \ |
| 29 | file://0001-Fix-build-with-fno-common.patch \ |
| 30 | file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \ |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 31 | file://0001-include-missing-array-header.patch \ |
| 32 | file://0002-configure-Disable-selected-warnings.patch \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 33 | file://0001-include-cstdint-for-uintXX_t-types.patch \ |
| 34 | file://0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 35 | " |
| 36 | SRC_URI[sha256sum] = "f008d53c83087ce2014c6089bc4ef08e14c1b4091298b943f4ceade1aa6bf61e" |
| 37 | |
| 38 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases" |
| 39 | |
| 40 | inherit autotools useradd systemd pkgconfig |
| 41 | |
| 42 | USERADD_PACKAGES = "${PN}" |
| 43 | GROUPADD_PARAM:${PN} = "-f -r opensaf" |
| 44 | USERADD_PARAM:${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" |
| 45 | |
| 46 | SYSTEMD_SERVICE:${PN} += "opensafd.service" |
| 47 | SYSTEMD_AUTO_ENABLE = "disable" |
| 48 | |
| 49 | PACKAGECONFIG[systemd] = ",,systemd" |
| 50 | PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi" |
| 51 | PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi" |
| 52 | |
| 53 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" |
| 54 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 55 | CPPFLAGS += "-Wno-error" |
| 56 | CXXFLAGS += "-Wno-error" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 57 | LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" |
| 58 | |
| 59 | do_install:append() { |
| 60 | rm -fr "${D}${localstatedir}/lock" |
| 61 | rm -fr "${D}${localstatedir}/run" |
| 62 | rmdir "${D}${localstatedir}/log/${BPN}/saflog" |
| 63 | rmdir "${D}${localstatedir}/log/${BPN}" |
| 64 | rmdir "${D}${localstatedir}/log" |
| 65 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" |
| 66 | rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" |
| 67 | |
| 68 | # Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is |
| 69 | # needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass |
| 70 | # if sysvinit is not in DISTRO_FEATURES. |
| 71 | mv ${D}${sysconfdir}/init.d/opensafd ${D}${libdir}/${BPN}/opensafd-init |
| 72 | ln -srf ${D}${libdir}/${BPN}/opensafd-init ${D}${sysconfdir}/init.d/opensafd |
| 73 | [ ! -f ${D}${systemd_system_unitdir}/opensafd.service ] || |
| 74 | sed -ri -e "s|/etc/init.d/opensafd|${libdir}/${BPN}/opensafd-init|" ${D}${systemd_system_unitdir}/opensafd.service |
| 75 | |
| 76 | # Create /var/log/opensaf/saflog in runtime. |
| 77 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then |
| 78 | install -d ${D}${nonarch_libdir}/tmpfiles.d |
| 79 | echo "d ${localstatedir}/log/${BPN}/saflog - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf |
| 80 | fi |
| 81 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then |
| 82 | install -d ${D}${sysconfdir}/default/volatiles |
| 83 | echo "d root root 0755 ${localstatedir}/log/${BPN}/saflog none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} |
| 84 | fi |
| 85 | } |
| 86 | |
| 87 | FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service" |
| 88 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" |
| 89 | FILES:${PN}-dev += "${libdir}/libopensaf_core.so" |
| 90 | FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a" |
| 91 | |
| 92 | INSANE_SKIP:${PN} = "dev-so" |
| 93 | |
| 94 | RDEPENDS:${PN} += "bash python3-core" |
| 95 | |
| 96 | # http://errors.yoctoproject.org/Errors/Details/186970/ |
| 97 | COMPATIBLE_HOST:libc-musl = 'null' |
| 98 | |
| 99 | FILES_SOLIBSDEV = "" |