blob: da9c105207227cb31b3718c39ab7db24f0854569 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "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"
Patrick Williamsddad1a12017-02-23 20:36:32 -060013SECTION = "admin"
14LICENSE = "LGPLv2.1"
15LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050016
Patrick Williamsddad1a12017-02-23 20:36:32 -060017DEPENDS = "libxml2 python"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050018
19SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
20 file://install-samples-from-srcdir.patch \
21 file://0001-plmcd-error-fix.patch \
22 "
23
Patrick Williamsddad1a12017-02-23 20:36:32 -060024SRC_URI[md5sum] = "94cd1a4c0406e6a45bb04c003f8690e7"
25SRC_URI[sha256sum] = "4b4188a0f3d0ed1ed0e3d77de27c45e2c96b437401de08e7df2ed9ecd54bb999"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050026
Patrick Williamsddad1a12017-02-23 20:36:32 -060027inherit autotools useradd systemd pkgconfig
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028
29USERADD_PACKAGES = "${PN}"
30GROUPADD_PARAM_${PN} = "-f -r opensaf"
31USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
32
33SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
34SYSTEMD_AUTO_ENABLE = "disable"
35
36PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
37PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
38
Patrick Williamsb48b7b42016-08-17 15:04:38 -050039EXTRA_OECONF += " --libdir=${libdir}/opensaf "
40EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
41
42PKGLIBDIR="${libdir}/opensaf/opensaf"
43
Patrick Williamsddad1a12017-02-23 20:36:32 -060044do_configure_prepend () {
45 ( cd ${S}; autoreconf -f -i -s )
46}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050047
48do_install_append() {
49 rm -fr "${D}${localstatedir}/lock"
50 rm -fr "${D}${localstatedir}/run"
51 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
52 install -d ${D}${systemd_unitdir}/system
53 install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
54 ${D}${systemd_unitdir}/system
55 install -m 0644 ${B}/contrib/plmc/config/*.service ${D}/${systemd_unitdir}/system
Patrick Williamsb48b7b42016-08-17 15:04:38 -050056}
Patrick Williamsddad1a12017-02-23 20:36:32 -060057
58FILES_${PN} += "${localstatedir}/run ${systemd_unitdir}/system/*.service"
59FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
60
61INSANE_SKIP_${PN} = "dev-so"
62
63RDEPENDS_${PN} += "bash python"
64
65do_sysvinit_install() {
66 if [ ! -d "${D}${sysconfdir}/init.d" ]; then
67 install -d ${D}${sysconfdir}/init.d
68 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
69 fi
70}
71
72addtask sysvinit_install after do_install before do_package
73