summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb')
-rw-r--r--meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb119
1 files changed, 119 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
new file mode 100644
index 000000000..c4b3309f7
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
@@ -0,0 +1,119 @@
1SUMMARY = "Hardware Platform Interface Library and Tools"
2
3DESCRIPTION = "\
4OpenHPI is an open source project created with the intent of providing an \
5implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \
6provides an abstracted interface to managing computer hardware, typically for \
7chassis and rack based servers. HPI includes resource modeling; access to and \
8control over sensor, control, watchdog, and inventory data associated with \
9resources; abstracted System Event Log interfaces; hardware events and alerts; \
10and a managed hotswap interface. \
11\
12OpenHPI provides a modular mechanism for adding new hardware and device support \
13easily. Many plugins exist in the OpenHPI source tree to provide access to \
14various types of hardware. This includes, but is not limited to, IPMI based \
15servers, Blade Center, and machines which export data via sysfs. \
16"
17
18HOMEPAGE = "http://openhpi.sourceforge.net/Home"
19SECTION = "net"
20LICENSE = "BSD"
21LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
22
23DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \
24 autoconf-archive-native os-release"
25
26SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
27 file://openhpi.init \
28 file://openhpid.service \
29 file://run-ptest \
30 file://openhpi-netsnmp-cross-compile.patch \
31 file://openhpi-sysfs-cross-compile.patch \
32 file://openhpi-libxml2-cross-compile.patch \
33 file://openhpi-glib-cross-compile.patch \
34 file://openhpi-linkfix.patch \
35 file://openhpi-fix-host-gcc.patch \
36 file://openhpi-fix-testfail-errors.patch \
37 file://openhpi-add-libnetsnmp-when-link.patch \
38 file://openhpi-invalide-session.patch \
39 file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
40 file://openhpi-fix-alignment-issue.patch \
41 file://c++11.patch \
42 file://clang-c++11.patch \
43 file://fix-narrowing-warning.patch \
44 file://0001-session-close-socket.patch \
45 file://openhpi-3.6.1-ssl.patch \
46 file://0001-Do-not-poke-at-build-host-s-etc-os-release.patch \
47 file://cross_899198.patch \
48 file://no-md2.patch \
49 file://0001-include-iostream-for-cout.patch \
50 "
51SRC_URI[md5sum] = "fffda3deea8a0d3671a72eea9d13a4df"
52SRC_URI[sha256sum] = "c94332a29160dd75cb799c027e614690c00263b0fabed87417707bec04c38723"
53
54inherit autotools pkgconfig ptest update-rc.d systemd
55
56PACKAGES =+ "${PN}-libs"
57
58FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
59
60INSANE_SKIP_${PN}-libs = "dev-so"
61RDEPENDS_${PN} += "${PN}-libs"
62
63PACKAGECONFIG ??= "libgcrypt non32bit"
64PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
65PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
66PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,,"
67
68export DISTRO
69
70do_install_append () {
71 install -m 0755 -d ${D}${sysconfdir}/${BPN}
72 install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf
73 install -m 0700 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf
74 install -m 0755 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data
75 install -m 0755 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data
76 install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid
77
78 install -d ${D}${systemd_unitdir}/system
79 install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system
80 sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \
81 ${D}${systemd_unitdir}/system/openhpid.service
82}
83
84do_compile_ptest () {
85 for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
86 dir=`dirname ${x}`
87 upper=`dirname ${dir}`
88 if [ `basename ${upper}` != "cpp" ]; then
89 oe_runmake -C ${dir} buildtest-TESTS
90 fi
91 done
92}
93
94do_install_ptest () {
95 cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/
96 TESTS="utils marshal openhpid"
97 for subtest in ${TESTS}; do
98 mkdir -p ${D}${PTEST_PATH}/${subtest}/t
99 cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t
100 done
101
102 for x in `find ${D}${PTEST_PATH} -name Makefile`; do
103 sed -i "s:${S}:${PTEST_PATH}/:g" ${x};
104 sed -i "s/^Makefile:/MM:/g" ${x};
105 done;
106
107 mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/
108 cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/
109 cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/
110 find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \;
111 find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
112 find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \;
113}
114
115INITSCRIPT_NAME = "openhpid"
116INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
117
118SYSTEMD_SERVICE_${PN} = "openhpid.service"
119SYSTEMD_AUTO_ENABLE = "disable"