File OpenIPMI.spec of Package OpenIPMI.8463
#
# spec file for package OpenIPMI
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: OpenIPMI
Version: 2.0.21
Release: 0
Summary: Provides access to service processors via IPMI
License: LGPL-2.1+
Group: System/Monitoring
Url: http://openipmi.sourceforge.net
Source0: http://prdownloads.sourceforge.net/openipmi/%{name}-%{version}.tar.gz
Source1: sysconfig.ipmi
Source2: ipmi.service
Source3: openipmi-helper
Source99: OpenIPMI-rpmlintrc
Patch0: OpenIPMI-prefer_perl_vendor.patch
Patch1: OpenIPMI-libtool.patch
Patch2: fix-conversions.patch
Patch3: OpenIPMI/OpenIPMI_2.0.21_to_HEAD.patch
Patch4: 0001-Apply-OpenIPMI-2.0.18-pthread-pkgconfig.patch.patch
Patch5: OpenIPMI-install-gui_winsys.patch
BuildRequires: gd-devel
BuildRequires: gdbm-devel
BuildRequires: glib2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: net-snmp-devel
BuildRequires: openssl-devel
BuildRequires: perl-macros
BuildRequires: pkg-config
BuildRequires: popt-devel
BuildRequires: python-devel
BuildRequires: python-tk
BuildRequires: python-xml
BuildRequires: swig
BuildRequires: tcl-devel
BuildRequires: tix
BuildRequires: pkgconfig(systemd)
%{perl_requires}
PreReq: %fillup_prereq
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: %{install_info_prereq}
Provides: ipmi_ui
Provides: ipmicmd
Provides: ipmilan
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%{perl_requires}
# Perl is sometimes installed in /usr/lib, not /usr/lib64 on 64-bit platforms.
# %define perl_libdir %{_exec_prefix}/lib
%description
OpenIPMI is an effort to create a full-function IPMI system to allow
full access to all IPMI information on a server and to abstract it to a
level that makes it easy to use.
OpenIPMI consists of two main parts: a device driver that is included
in the Linux kernel and a user-level library that provides a
higher-level abstraction of IPMI and generic services that can be used
on any operation system. This package contains the user-level library
part. This OpenIPMI library also includes the ipmicmd program, a small
program that lets you inject and receive messages.
%package devel
Summary: OpenIPMI - Development libraries
Group: Development/Libraries/Other
Requires: OpenIPMI = %{version}
Requires: glibc-devel
Provides: libIPMIlanserv
Provides: libOpenIPMI
Provides: libOpenIPMIui
%description devel
These libraries are needed to get full access to the OpenIPMI
functions.
%package python
Summary: OpenIPMI
Group: System/Monitoring
Requires: OpenIPMI
Requires: python-tk
Requires: tix
Provides: openipmigui
%description python
The python parts provide a OpenIPMI python library and a GUI, openipmigui
making use of it.
%prep
%setup -q
%patch0 -p1
%patch1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
autoreconf --install --force
%configure --disable-static --with-pic \
--with-openssl=yes \
--with-pythoninstall=%{py_sitedir} \
--with-tcl=yes \
--with-tcllibs=-ltcl%{tcl_version}
# parallel make does not work
make
%install
make DESTDIR=%{buildroot} install
install -d %{buildroot}%{_localstatedir}/adm/fillup-templates
install -d %{buildroot}%{_unitdir}
install -d %{buildroot}/sbin
case "%{_arch}" in
ppc64*) IPMI_SI_MODULE_NAME=ipmi_powernv;;
aarch64|arm*) IPMI_SI_MODULE_NAME=ipmi_ssif;;
*) IPMI_SI_MODULE_NAME=ipmi_si;;
esac
sed -i "s/^IPMI_SI_MODULE_NAME=.*/IPMI_SI_MODULE_NAME=\"$IPMI_SI_MODULE_NAME\"/" %{SOURCE1}
install -m 644 %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
ln -sv %{_sbindir}/service %{buildroot}/sbin/rcipmi
install -d %{buildroot}%{_libexecdir}
install -m 755 %{SOURCE3} %{buildroot}%{_libexecdir}/openipmi-helper
find %{buildroot} -type f -name "*.la" -delete -print
# rebuild python files to fix timestamps:
for d in "%{python_sitelib}" "%{python_sitearch}"; do
[ -d "%{buildroot}$d" ] || continue
find "%{buildroot}$d/" -type f \( -name '*.pyc' -o -name '*.pyo' \) -exec rm {} \;
python -c 'import compileall; compileall.compile_dir("%{buildroot}'"$d"'",ddir="'"$d"'",force=1)'
done
%pre
%service_add_pre ipmi.service
%preun
%service_del_preun ipmi.service
%post
/sbin/ldconfig
%fillup_only -n ipmi
%service_add_post ipmi.service
%postun
/sbin/ldconfig
%service_del_postun ipmi.service
%files
%defattr(-,root,root)
%doc CONFIGURING_FOR_LAN COPYING COPYING.BSD COPYING.LIB FAQ
%doc README README.Force README.MotorolaMXP
%{_localstatedir}/adm/fillup-templates/sysconfig.ipmi
%{_unitdir}/ipmi.service
/sbin/rcipmi
%{_libdir}/libOpenIPMI*.so.*
%{_libexecdir}/openipmi-helper
%dir %{_sysconfdir}/ipmi
%config(noreplace) %{_sysconfdir}/ipmi/*
###### perl files ######
%dir %{perl_vendorarch}/auto/OpenIPMI
%{perl_vendorarch}/auto/OpenIPMI/OpenIPMI.so
%{perl_vendorarch}/OpenIPMI.pm
%doc swig/perl/sample swig/perl/ipmi_powerctl
###### ui files ######
%{_bindir}/ipmi_sim
%{_bindir}/ipmi_ui
%{_bindir}/ipmicmd
%{_bindir}/openipmicmd
%{_bindir}/ipmish
%{_bindir}/openipmish
%{_bindir}/sdrcomp
%{_bindir}/solterm
%{_bindir}/rmcp_ping
%{_bindir}/openipmi_eventd
%{_mandir}/man1/ipmi_ui.1*
%{_mandir}/man1/openipmicmd.1*
%{_mandir}/man1/openipmish.1*
%{_mandir}/man1/solterm.1*
%{_mandir}/man1/openipmi_eventd.1*
%{_mandir}/man1/rmcp_ping.1*
%{_mandir}/man1/ipmi_sim.1*
%{_mandir}/man5/ipmi_lan.5*
%{_mandir}/man5/ipmi_sim_cmd.5*
%{_mandir}/man7/ipmi_cmdlang.7*
%{_mandir}/man7/openipmi_conparms.7*
###### lanserv files #####
%{_bindir}/ipmilan
%{_libdir}/libIPMIlanserv.so.*
%{_mandir}/man8/ipmilan.8*
%files devel
%defattr(644,root,root,755)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%doc doc/IPMI.pdf
###################################################
%files python
%defattr(644,root,root,755)
%{py_sitedir}/*OpenIPMI.*
%doc swig/OpenIPMI.i
###### gui files ######
%dir %{py_sitedir}/openipmigui
%{py_sitedir}/openipmigui/*
%attr(755,root,root) %{_bindir}/openipmigui
%{_mandir}/man1/openipmigui.1*
%changelog