OpenIPMI/OpenIPMI.spec

183 lines
5.1 KiB
RPMSpec
Raw Normal View History

2019-12-29 16:54:49 +08:00
Name: OpenIPMI
2020-05-11 22:43:59 +08:00
Version: 2.0.28
Release: 1
2019-12-29 16:54:49 +08:00
Summary: IPMI (Intelligent Platform Management Interface) library and tools
License: LGPLv2+ and GPLv2+ or BSD
URL: https://sourceforge.net/projects/openipmi/
Source: https://downloads.sourceforge.net/openipmi/%{name}-%{version}.tar.gz
Source1: openipmi.sysconf
Source2: ipmi.service
2020-03-02 20:06:02 +08:00
Source3: openipmi-helper
2019-12-29 16:54:49 +08:00
2020-05-11 22:43:59 +08:00
Patch6000: 0001-man.patch
Patch6001: 0002-readline-includes.patch
2019-12-29 16:54:49 +08:00
BuildRequires: gdbm-devel swig glib2-devel net-snmp-devel ncurses-devel
BuildRequires: openssl-devel python3-devel perl-devel perl-generators
BuildRequires: pkgconfig libedit-devel automake autoconf libtool readline-devel
%{?systemd_requires}
BuildRequires: systemd
Provides: %{name}-libs
Obsoletes: %{name}-libs
Provides: %{name}-lanserv
Obsoletes: %{name}-lanserv
%description
This is the OpenIPMI library, a library that makes simplifies building
complex IPMI management software.IPMI is a specification detailing how
to detect and manage sensors in a system. It also specifies some
chassis-level thing like power control,reset, FRU (Field Replaceable Unit)
information, and watchdogs.
%package perl
Summary: IPMI Perl language bindings
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: %{name}%{?_isa} = %{version}-%{release}
%description perl
The OpenIPMI-perl package contains the Perl language bindings for OpenIPMI.
%package -n python3-openipmi
%{?python_provide:%python_provide python3-openipmi}
%{?python_provide:%python_provide python3-OpenIPMI}
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python2 < %{version}-%{release}
Summary: IPMI Python language bindings
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-openipmi
The OpenIPMI-python package contains the Python language bindings for OpenIPMI.
%package devel
Summary: The development environment for the OpenIPMI project
Requires: pkgconfig %{name}%{?_isa} = %{version}-%{release}
%description devel
The OpenIPMI-devel package contains the development libraries and header files
of the OpenIPMI project.
%package_help
%prep
2020-05-11 22:43:59 +08:00
%autosetup -n %{name}-%{version} -p1
2019-12-29 16:54:49 +08:00
%build
%configure \
CFLAGS="-fPIC %{optflags} -z now -fno-strict-aliasing" \
LDFLAGS="%{__global_ldflags} -Wl,--as-needed" \
--disable-dependency-tracking \
--with-pythoninstall=%{python3_sitearch} \
--with-python=%{__python3} \
--with-tcl=no \
--with-tkinter=no
%disable_rpath
make
%install
%make_install
mkdir -p %{buildroot}{%{_sysconfdir}/sysconfig,%{_unitdir},%{_libexecdir}}
install -m 644 %SOURCE1 %{buildroot}%{_sysconfdir}/sysconfig/ipmi
install -m 644 %SOURCE2 %{buildroot}%{_unitdir}/ipmi.service
2020-03-02 20:06:02 +08:00
install -m 755 %SOURCE3 %{buildroot}%{_libexecdir}/openipmi-helper
2019-12-29 16:54:49 +08:00
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
echo ".so man1/ipmicmd.1" > %{buildroot}%{_mandir}/man1/ipmicmd.1
echo ".so man1/openipmish.1" > %{buildroot}%{_mandir}/man1/ipmish.1
%delete_la
%post
%systemd_post ipmi.service
%preun
%systemd_preun ipmi.service
%postun
%systemd_postun_with_restart ipmi.service
%ldconfig_scriptlets
%triggerun -- OpenIPMI < 2.0.18-14
/usr/bin/systemd-sysv-convert --save ipmi >/dev/null 2>&1 ||:
/bin/systemctl --no-reload enable ipmi.service >/dev/null 2>&1 ||:
/sbin/chkconfig --del ipmi >/dev/null 2>&1 || :
/bin/systemctl try-restart ipmi.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root)
%license COPYING COPYING.BSD COPYING.LIB
%config(noreplace) %{_sysconfdir}/sysconfig/ipmi
2020-03-02 20:06:02 +08:00
%{_libexecdir}/openipmi-helper
2019-12-29 16:54:49 +08:00
%config(noreplace) %{_sysconfdir}/ipmi/*
%{_bindir}/*
%{_libdir}/*.so.*
%{_unitdir}/ipmi.service
%files perl
%defattr(-,root,root)
%{perl_vendorarch}/OpenIPMI.pm
%{perl_vendorarch}/auto/OpenIPMI
%files -n python3-openipmi
%defattr(-,root,root)
%{python3_sitearch}/*OpenIPMI*
%{python3_sitearch}/__pycache__/OpenIPMI.*.pyc
%files devel
%defattr(-,root,root)
%{_includedir}/OpenIPMI
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/pkgconfig/*.pc
%files help
%defattr(-,root,root)
%doc README.MotorolaMXP README.Force README FAQ CONFIGURING_FOR_LAN
%{_mandir}/man*/*
%exclude %{_mandir}/man1/openipmigui.1
%changelog
2020-05-11 22:43:59 +08:00
* Wed Apr 15 2020 fengtao<fengtao40@huawei.com> - 2.0.28-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: update to 2.0.28
* Sat Mar 28 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.27-6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: fix openipmi in virt
2020-03-07 15:03:39 +08:00
* Sat Mar 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.27-5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: change openipmi-helper fileformat
2020-03-02 20:06:02 +08:00
* Mon Mar 2 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.27-4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add openipmi-helper file
2020-01-11 20:23:17 +08:00
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.27-3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: delete patches
2019-12-29 16:54:49 +08:00
* Sat Dec 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.0.27-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:modify the spec
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.0.27-1
- Package init