diff options
Diffstat (limited to 'meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb')
-rw-r--r-- | meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb b/meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb new file mode 100644 index 000000000..a1f26edb4 --- /dev/null +++ b/meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb | |||
@@ -0,0 +1,109 @@ | |||
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 | python \ | ||
15 | swig-native \ | ||
16 | " | ||
17 | |||
18 | LICENSE = "GPLv2 & LGPLv2.1 & BSD" | ||
19 | |||
20 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
21 | file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ | ||
22 | file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \ | ||
23 | " | ||
24 | |||
25 | SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \ | ||
26 | file://fix-symlink-install-error-in-cmdlang.patch \ | ||
27 | file://openipmi-no-openipmigui-man.patch \ | ||
28 | file://openipmi-remove-host-path-from-la_LDFLAGS.patch \ | ||
29 | file://ipmi-init-fix-the-arguments.patch \ | ||
30 | file://do-not-install-pyc-and-pyo.patch \ | ||
31 | file://include_sys_types.patch \ | ||
32 | file://openipmi-helper \ | ||
33 | file://ipmi.service \ | ||
34 | " | ||
35 | |||
36 | S = "${WORKDIR}/OpenIPMI-${PV}" | ||
37 | SRC_URI[md5sum] = "1461ac4d78fc516646fd0a6e605a8b05" | ||
38 | SRC_URI[sha256sum] = "f0f1a0ec732409930b7a31a6daa6cf39b585f52059b62a5f092b7ece21aa75a5" | ||
39 | |||
40 | inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd | ||
41 | |||
42 | EXTRA_OECONF = "--disable-static \ | ||
43 | --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \ | ||
44 | --with-python='${STAGING_BINDIR_NATIVE}/python-native/python' \ | ||
45 | --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \ | ||
46 | --with-glibver=2.0" | ||
47 | |||
48 | PACKAGECONFIG ??= "gdbm" | ||
49 | PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm," | ||
50 | |||
51 | PACKAGES += "${PN}-perl ${PN}-python" | ||
52 | |||
53 | FILES_${PN}-perl = " \ | ||
54 | ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \ | ||
55 | ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \ | ||
56 | " | ||
57 | |||
58 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" | ||
59 | |||
60 | FILES_${PN}-dbg += " \ | ||
61 | ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \ | ||
62 | ${PYTHON_SITEPACKAGES_DIR}/.debug \ | ||
63 | " | ||
64 | |||
65 | do_configure () { | ||
66 | |||
67 | # Let's perform regular configuration first then handle perl issues. | ||
68 | autotools_do_configure | ||
69 | |||
70 | perl_ver=`perl -V:version | cut -d\' -f 2` | ||
71 | |||
72 | # Force openipmi perl bindings to be compiled using perl-native instead of | ||
73 | # the host's perl. Set the proper install directory for the resulting | ||
74 | # openipmi.pm and openipmi.so | ||
75 | for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do | ||
76 | echo "SAL: i = $i" | ||
77 | echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE" | ||
78 | echo "SAL: libdir = $libdir" | ||
79 | sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i | ||
80 | sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i | ||
81 | done | ||
82 | } | ||
83 | |||
84 | do_install_append () { | ||
85 | echo "SAL: D = $D" | ||
86 | echo "SAL: libdir = $libdir" | ||
87 | install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d | ||
88 | install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi | ||
89 | install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi | ||
90 | # 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 | ||
91 | # 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. | ||
92 | if [ -d ${D}${libdir}/perl5 ] | ||
93 | then | ||
94 | mv ${D}${libdir}/perl5 ${D}${libdir}/perl | ||
95 | fi | ||
96 | |||
97 | # for systemd | ||
98 | install -d ${D}${systemd_unitdir}/system | ||
99 | install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system | ||
100 | sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service | ||
101 | install -d ${D}${libexecdir} | ||
102 | install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir} | ||
103 | } | ||
104 | |||
105 | INITSCRIPT_NAME = "ipmi" | ||
106 | INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." | ||
107 | |||
108 | SYSTEMD_SERVICE_${PN} = "ipmi.service" | ||
109 | SYSTEMD_AUTO_ENABLE = "disable" | ||