openipmi_2.0.30.bb 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. HOMEPAGE = "http://openipmi.sourceforge.net"
  6. DEPENDS = " \
  7. glib-2.0 \
  8. ncurses \
  9. net-snmp \
  10. openssl \
  11. popt \
  12. python3 \
  13. swig-native \
  14. readline \
  15. "
  16. LICENSE = "GPLv2 & LGPLv2.1 & BSD"
  17. LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
  18. file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
  19. file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \
  20. "
  21. SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \
  22. file://fix-symlink-install-error-in-cmdlang.patch \
  23. file://openipmi-no-openipmigui-man.patch \
  24. file://openipmi-remove-host-path-from-la_LDFLAGS.patch \
  25. file://ipmi-init-fix-the-arguments.patch \
  26. file://include_sys_types.patch \
  27. file://openipmi-helper \
  28. file://ipmi.service \
  29. "
  30. S = "${WORKDIR}/OpenIPMI-${PV}"
  31. SRC_URI[md5sum] = "8d35f68058ca5359973b4121e1544d31"
  32. SRC_URI[sha256sum] = "237a9be2a30bde85a88c4ec2759b54eb5b21fede554ffabf8fef1ffac2b42ade"
  33. inherit autotools-brokensep pkgconfig python3native perlnative update-rc.d systemd cpan-base
  34. EXTRA_OECONF = "--disable-static \
  35. --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \
  36. --with-python='${STAGING_BINDIR_NATIVE}/python3-native/python3' \
  37. --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \
  38. --with-glibver=2.0"
  39. PACKAGECONFIG ??= "gdbm"
  40. PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm,"
  41. PACKAGES += "${PN}-perl ${PN}-python"
  42. PRIVATE_LIBS_${PN}-perl = "libOpenIPMI.so.0"
  43. FILES_${PN}-perl = " \
  44. ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \
  45. ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \
  46. "
  47. FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
  48. FILES_${PN}-dbg += " \
  49. ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \
  50. ${PYTHON_SITEPACKAGES_DIR}/.debug \
  51. "
  52. do_configure () {
  53. # Let's perform regular configuration first then handle perl issues.
  54. autotools_do_configure
  55. perl_ver=`perl -V:version | cut -d\' -f 2`
  56. # Force openipmi perl bindings to be compiled using perl-native instead of
  57. # the host's perl. Set the proper install directory for the resulting
  58. # openipmi.pm and openipmi.so
  59. for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do
  60. echo "SAL: i = $i"
  61. echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE"
  62. echo "SAL: libdir = $libdir"
  63. sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i
  64. 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
  65. sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i
  66. done
  67. }
  68. do_install_append () {
  69. echo "SAL: D = $D"
  70. echo "SAL: libdir = $libdir"
  71. install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d
  72. install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi
  73. install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi
  74. # 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
  75. # 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.
  76. if [ -d ${D}${libdir}/perl5 ]
  77. then
  78. mv ${D}${libdir}/perl5 ${D}${libdir}/perl
  79. fi
  80. # for systemd
  81. install -d ${D}${systemd_unitdir}/system
  82. install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system
  83. sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service
  84. install -d ${D}${libexecdir}
  85. install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir}
  86. }
  87. INITSCRIPT_NAME = "ipmi"
  88. INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
  89. SYSTEMD_SERVICE_${PN} = "ipmi.service"
  90. SYSTEMD_AUTO_ENABLE = "disable"