File freeipmi-compat.spec of Package freeipmi-compat
#
# spec file for package freeipmi-compat
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2003-2008 FreeIPMI Core Team
#
# 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/
#
%define name freeipmi-compat
%define version 1.4.3
%define srcversion %{version}
%if %{?_with_debug:1}%{!?_with_debug:0}
%define release 1.debug%{?dist}
%else
%define release 1%{?dist}
%endif
%define libipmimonitoring_soname 5
%define libfreeipmi_soname 16
%{!?_initddir: %global _initddir %{_sysconfdir}/init.d}
Name: %{name}
Version: %{version}
Release: %{release}
Url: http://www.gnu.org/software/freeipmi/
Source0: http://ftp.gnu.org/gnu/freeipmi/freeipmi-%{srcversion}.tar.gz
Summary: FreeIPMI
License: GPL-3.0+
Group: System/Management
BuildRequires: automake
BuildRequires: libgcrypt-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: texinfo
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
%if 0%{?suse_version} >=1230
BuildRequires: pkgconfig(systemd)
%endif
Obsoletes: freeipmi-ipmimonitoring < %{version}
Provides: freeipmi-ipmimonitoring = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Necessary as only those archs implement iopl and friends (#368541)
ExclusiveArch: %{ix86} x86_64 ia64 alpha
%description
This project provides "Remote-Console" (out-of-band) and
"System Management Software" (in-band) based on Intelligent
Platform Management Interface specification.
%package -n libipmimonitoring%{libipmimonitoring_soname}
Summary: FreeIPMI library
Group: System/Libraries
%description -n libipmimonitoring%{libipmimonitoring_soname}
This project provides "Remote-Console" (out-of-band) and
"System Management Software" (in-band) based on Intelligent
Platform Management Interface specification.
This package contains the libipmimonitoring library.
%package -n libfreeipmi%{libfreeipmi_soname}
Summary: FreeIPMI library
Group: System/Libraries
%description -n libfreeipmi%{libfreeipmi_soname}
This project provides "Remote-Console" (out-of-band) and
"System Management Software" (in-band) based on Intelligent
Platform Management Interface specification.
This package contains the libfreeipmi library.
%prep
%setup -q -n freeipmi-%{srcversion}
%build
aclocal -I config
autoheader
libtoolize --force --automake --copy
autoconf
automake --gnu --include-deps --copy --add-missing
%define docpath %{_docdir}/%{name}
%configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
--docdir=%{docpath} \
%{?_enable_debug} --disable-static
CFLAGS="%{optflags}" make %{?_smp_mflags}
%install
mkdir -p %{buildroot}
%makeinstall
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_sbindir}
rm -rf %{buildroot}%{_sysconfdir}
rm -rf %{buildroot}%{_unitdir}/*
rm -rf %{buildroot}%{_libdir}/libipmiconsole*so.*
rm -rf %{buildroot}%{_libdir}/libipmidetect*so.*
rm -rf %{buildroot}%{_localstatedir}/lib/*
rm -rf %{buildroot}%{_libdir}/libipmiconsole.so
rm -rf %{buildroot}%{_libdir}/libfreeipmi.so
rm -rf %{buildroot}%{_libdir}/libipmidetect.so
rm -rf %{buildroot}%{_libdir}/libipmimonitoring.so
rm -rf %{buildroot}%{_libdir}/pkgconfig/*
rm -rf %{buildroot}%{_includedir}
rm -rf %{buildroot}/usr/share
# Silent build check warning
rm -f %{buildroot}%{_datadir}/doc/packages/freeipmi/INSTALL
# Remove .la files
rm -rf %{buildroot}/%{_libdir}/*.la
%post -n libipmimonitoring%{libipmimonitoring_soname} -p /sbin/ldconfig
%postun -n libipmimonitoring%{libipmimonitoring_soname} -p /sbin/ldconfig
%post -n libfreeipmi%{libfreeipmi_soname} -p /sbin/ldconfig
%postun -n libfreeipmi%{libfreeipmi_soname} -p /sbin/ldconfig
%files -n libipmimonitoring%{libipmimonitoring_soname}
%defattr(-,root,root)
%{_libdir}/libipmimonitoring.so.%{libipmimonitoring_soname}*
%files -n libfreeipmi%{libfreeipmi_soname}
%defattr(-,root,root)
%{_libdir}/libfreeipmi*so.%{libfreeipmi_soname}*
%changelog