libsmbios/libsmbios.spec
2019-10-31 18:26:28 +01:00

114 lines
2.9 KiB
RPMSpec

%define major 2
%define libname %mklibname smbios %{major}
%define devname %mklibname smbios -d
Summary: Open BIOS parsing libs
Name: libsmbios
Version: 2.4.2
Release: 1
License: GPLv2+
Group: System/Libraries
Url: https://github.com/dell
Source0: https://github.com/dell/libsmbios/archive/%{name}-%{version}.tar.gz
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: help2man
BuildRequires: gettext-devel
BuildRequires: pkgconfig(cppunit)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(python3)
# libsmbios only ever makes sense on intel compatible arches:
# no DMI tables on ppc, s390, etc.
ExclusiveArch: %{ix86} x86_64
%description
Libsmbios is a library and utilities that can be used by client programs to
get information from standard BIOS tables, such as the SMBIOS table.
#----------------------------------------------------------------------------
%package -n %{libname}
Summary: Libsmbios shared libraries
Group: System/Libraries
%description -n %{libname}
Libsmbios is a library and utilities that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
%files -n %{libname}
%doc COPYING
#{_libdir}/libsmbios.so.%%{major}*
%{_libdir}/libsmbios_c.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Development headers and archives
Group: Development/C++
Requires: %{libname} = %{EVRD}
Provides: %{name}-devel = %{EVRD}
%description -n %{devname}
Libsmbios is a library and utilities that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
This package contains the headers and the files necessary to compile new
client programs against libsmbios.
%files -n %{devname}
%doc COPYING
%{_includedir}/smbios_c
%{_libdir}/*.so
%{_libdir}/pkgconfig/libsmbios_c.pc
#----------------------------------------------------------------------------
%package utils
Summary: The "supported" sample binaries that use libsmbios
Group: System/Configuration/Hardware
Provides: %{name}-bin = %{EVRD}
%description utils
Libsmbios is a library and utilities that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
This package contains some utilities that use libsmbios.
%files utils -f %{name}.lang
%doc COPYING README.md doc/*
%config(noreplace) %{_sysconfdir}/%{name}/logging.conf
%{_sbindir}/smbios-*
%{_datadir}/smbios-utils
%{_mandir}/man1/smbios-*.1.*
%{py3_platsitedir}/%{name}_c/*
#----------------------------------------------------------------------------
%prep
%setup -q
#fix tests
find src/ -name *.py -exec sed -i -e 's|python2|python|g' {} \;
#sed -i -e 's#-Werror ##' Makefile.*
%build
autoreconf -vfi
%configure2_5x --disable-rpath \
--disable-static
%make
%install
%makeinstall_std
# Fix perms
chmod +x %{buildroot}%{py3_platsitedir}/%{name}_c/trace_decorator.py
%find_lang %{name}
%check
%make check