Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | SUMMARY = "Hardware Platform Interface Library and Tools" |
| 2 | |
| 3 | DESCRIPTION = "\ |
| 4 | OpenHPI is an open source project created with the intent of providing an \ |
| 5 | implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \ |
| 6 | provides an abstracted interface to managing computer hardware, typically for \ |
| 7 | chassis and rack based servers. HPI includes resource modeling; access to and \ |
| 8 | control over sensor, control, watchdog, and inventory data associated with \ |
| 9 | resources; abstracted System Event Log interfaces; hardware events and alerts; \ |
| 10 | and a managed hotswap interface. \ |
| 11 | \ |
| 12 | OpenHPI provides a modular mechanism for adding new hardware and device support \ |
| 13 | easily. Many plugins exist in the OpenHPI source tree to provide access to \ |
| 14 | various types of hardware. This includes, but is not limited to, IPMI based \ |
| 15 | servers, Blade Center, and machines which export data via sysfs. \ |
| 16 | " |
| 17 | |
| 18 | HOMEPAGE = "http://openhpi.sourceforge.net/Home" |
| 19 | SECTION = "net" |
| 20 | LICENSE = "BSD" |
| 21 | LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" |
| 22 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | |
| 25 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 26 | file://openhpi.init \ |
| 27 | file://openhpid.service \ |
| 28 | file://run-ptest \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | file://openhpi-netsnmp-cross-compile.patch \ |
| 30 | file://openhpi-sysfs-cross-compile.patch \ |
| 31 | file://openhpi-libxml2-cross-compile.patch \ |
| 32 | file://openhpi-glib-cross-compile.patch \ |
| 33 | file://openhpi-linkfix.patch \ |
| 34 | file://openhpi-fix-host-gcc.patch \ |
| 35 | file://openhpi-hpi-shell-thread-fix.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 \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 41 | file://0001-Fix-build-failures-with-gcc7.patch \ |
| 42 | file://c++11.patch \ |
| 43 | file://clang-c++11.patch \ |
| 44 | file://fix-narrowing-warning.patch \ |
| 45 | file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ |
| 46 | file://0001-ipmidirect-Replace-__STRING.patch \ |
| 47 | " |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 48 | |
| 49 | SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" |
| 50 | SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc" |
| 51 | |
| 52 | inherit autotools pkgconfig ptest update-rc.d systemd |
| 53 | |
| 54 | PACKAGES =+ "${PN}-libs" |
| 55 | |
| 56 | FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so" |
| 57 | |
| 58 | INSANE_SKIP_${PN}-libs = "dev-so" |
| 59 | RDEPENDS_${PN} += "${PN}-libs" |
| 60 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 61 | PACKAGECONFIG ??= "libgcrypt non32bit" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 62 | PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils," |
| 63 | PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt," |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 64 | PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,," |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 65 | |
| 66 | do_install_append () { |
| 67 | install -m 0755 -d ${D}${sysconfdir}/${BPN} |
| 68 | install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf |
| 69 | install -m 0700 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf |
| 70 | install -m 0755 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data |
| 71 | install -m 0755 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data |
| 72 | install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid |
| 73 | |
| 74 | install -d ${D}${systemd_unitdir}/system |
| 75 | install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system |
| 76 | sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \ |
| 77 | ${D}${systemd_unitdir}/system/openhpid.service |
| 78 | } |
| 79 | |
| 80 | do_compile_ptest () { |
| 81 | for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do |
| 82 | dir=`dirname ${x}` |
| 83 | upper=`dirname ${dir}` |
| 84 | if [ `basename ${upper}` != "cpp" ]; then |
| 85 | oe_runmake -C ${dir} buildtest-TESTS |
| 86 | fi |
| 87 | done |
| 88 | } |
| 89 | |
| 90 | do_install_ptest () { |
| 91 | cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/ |
| 92 | TESTS="utils marshal openhpid" |
| 93 | for subtest in ${TESTS}; do |
| 94 | mkdir -p ${D}${PTEST_PATH}/${subtest}/t |
| 95 | cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t |
| 96 | done |
| 97 | |
| 98 | for x in `find ${D}${PTEST_PATH} -name Makefile`; do |
| 99 | sed -i "s:${S}:${PTEST_PATH}/:g" ${x}; |
| 100 | sed -i "s/^Makefile:/MM:/g" ${x}; |
| 101 | done; |
| 102 | |
| 103 | mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/ |
| 104 | cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/ |
| 105 | cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/ |
| 106 | find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \; |
| 107 | find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; |
| 108 | find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \; |
| 109 | } |
| 110 | |
| 111 | INITSCRIPT_NAME = "openhpid" |
| 112 | INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." |
| 113 | |
| 114 | SYSTEMD_SERVICE_${PN} = "openhpid.service" |
| 115 | SYSTEMD_AUTO_ENABLE = "disable" |