Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "IPMI (Intelligent Platform Management Interface) library and tools" |
| 2 | DESCRIPTION = "OpenIPMI is an effort to create a full-function IPMI system, \ |
| 3 | to allow full access to all IPMI information on a server \ |
| 4 | and to abstract it to a level that will make it easy to use" |
| 5 | |
| 6 | HOMEPAGE = "http://openipmi.sourceforge.net" |
| 7 | |
| 8 | DEPENDS = " \ |
| 9 | glib-2.0 \ |
| 10 | ncurses \ |
| 11 | net-snmp \ |
| 12 | openssl \ |
| 13 | popt \ |
| 14 | python3 \ |
| 15 | swig-native \ |
| 16 | readline \ |
| 17 | " |
| 18 | |
| 19 | LICENSE = "GPLv2 & LGPLv2.1 & BSD" |
| 20 | |
| 21 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 22 | file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ |
| 23 | file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \ |
| 24 | " |
| 25 | |
| 26 | SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \ |
| 27 | file://fix-symlink-install-error-in-cmdlang.patch \ |
| 28 | file://openipmi-no-openipmigui-man.patch \ |
| 29 | file://openipmi-remove-host-path-from-la_LDFLAGS.patch \ |
| 30 | file://ipmi-init-fix-the-arguments.patch \ |
| 31 | file://include_sys_types.patch \ |
| 32 | file://openipmi-helper \ |
| 33 | file://ipmi.service \ |
| 34 | " |
| 35 | |
| 36 | S = "${WORKDIR}/OpenIPMI-${PV}" |
| 37 | |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 38 | SRC_URI[md5sum] = "ce8eb27da016dcad7543d0128fcb3b0a" |
| 39 | SRC_URI[sha256sum] = "7052f37726ff454b0dcac49f35dd030bc12c9570ca0ba5cd2d17774b8e9d9717" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 40 | |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 41 | inherit autotools-brokensep pkgconfig python3native perlnative update-rc.d systemd cpan-base python3targetconfig |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 42 | |
| 43 | EXTRA_OECONF = "--disable-static \ |
| 44 | --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \ |
| 45 | --with-python='${STAGING_BINDIR_NATIVE}/python3-native/python3' \ |
| 46 | --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \ |
| 47 | --with-glibver=2.0" |
| 48 | |
| 49 | PACKAGECONFIG ??= "gdbm" |
| 50 | PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm," |
| 51 | |
| 52 | PACKAGES += "${PN}-perl ${PN}-python" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | PRIVATE_LIBS:${PN}-perl = "libOpenIPMI.so.0" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | FILES:${PN}-perl = " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \ |
| 57 | ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \ |
| 58 | " |
| 59 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 61 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | FILES:${PN}-dbg += " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 63 | ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \ |
| 64 | ${PYTHON_SITEPACKAGES_DIR}/.debug \ |
| 65 | " |
| 66 | |
| 67 | do_configure () { |
| 68 | |
| 69 | # Let's perform regular configuration first then handle perl issues. |
| 70 | autotools_do_configure |
| 71 | |
| 72 | perl_ver=`perl -V:version | cut -d\' -f 2` |
| 73 | |
| 74 | # Force openipmi perl bindings to be compiled using perl-native instead of |
| 75 | # the host's perl. Set the proper install directory for the resulting |
| 76 | # openipmi.pm and openipmi.so |
| 77 | for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do |
| 78 | echo "SAL: i = $i" |
| 79 | echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE" |
| 80 | echo "SAL: libdir = $libdir" |
| 81 | sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i |
| 82 | sed -i -e "/^PERL_CFLAGS/s:-I .* :-I ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE :g" $i |
| 83 | sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i |
| 84 | done |
| 85 | } |
| 86 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 87 | do_install:append () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 88 | echo "SAL: D = $D" |
| 89 | echo "SAL: libdir = $libdir" |
| 90 | install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d |
| 91 | install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi |
| 92 | install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi |
| 93 | # SAL: mv: cannot stat `/localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/openipmi-2.0.19-r4/image/usr/lib64/perl5': No such file or directory |
| 94 | # SAL: real path to perl is /localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/perl-5.14.2-r8.3/package/usr/lib64/perl5 and it is a symlink to perl so no need to mv. |
| 95 | if [ -d ${D}${libdir}/perl5 ] |
| 96 | then |
| 97 | mv ${D}${libdir}/perl5 ${D}${libdir}/perl |
| 98 | fi |
| 99 | |
| 100 | # for systemd |
| 101 | install -d ${D}${systemd_unitdir}/system |
| 102 | install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system |
| 103 | sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service |
| 104 | install -d ${D}${libexecdir} |
| 105 | install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir} |
| 106 | } |
| 107 | |
| 108 | INITSCRIPT_NAME = "ipmi" |
| 109 | INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." |
| 110 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 111 | SYSTEMD_SERVICE:${PN} = "ipmi.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 112 | SYSTEMD_AUTO_ENABLE = "disable" |