libsmbios/libsmbios.spec
2013-12-06 22:57:24 +04:00

110 lines
2.9 KiB
RPMSpec

%define major 2
%define libname %mklibname smbios %{major}
%define develname %mklibname smbios -d
Summary: Open BIOS parsing libs
Name: libsmbios
Version: 2.2.28
Release: 2
License: GPLv2+ or OSL
Group: System/Libraries
URL: http://linux.dell.com/libsmbios/main
Source: http://linux.dell.com/libsmbios/download/%{name}/%{name}-%{version}/%{name}-%{version}.tar.bz2
# libsmbios only ever makes sense on intel compatible arches
# no DMI tables on ppc, s390, etc.
BuildRequires: libxml2-devel
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: graphviz
%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.
%package utils
Summary: The "supported" sample binaries that use libsmbios
Group: System/Configuration/Hardware
Provides: %{name}-bin = %{version}-%{release}
Obsoletes: %{name}-bin < 2.0.2
BuildRequires: python-devel
%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 sample binaries that use libsmbios.
%package -n %{develname}
Summary: Development headers and archives
Group: Development/C++
Requires: %{libname} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
Obsoletes: %mklibname smbios 1 -d
%description -n %{develname}
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 .a files necessary to compile new
client programs against libsmbios.
%prep
%setup -q
#fix tests
find src/ -name *.py -exec sed -i -e 's|python2|python|g' {} \;
sed -i -e 's#-Werror ##' Makefile.*
%build
%configure2_5x \
--disable-rpath
%make
%check
%make check
%install
%makeinstall_std
mkdir -p %{buildroot}/%{_includedir}
cp -a src/include/smbios %{buildroot}/%{_includedir}
cp -a src/include/smbios_c %{buildroot}/%{_includedir}
# (tpg) looks like hal need this
ln -s %{_sbindir}/dellWirelessCtl %{buildroot}%{_bindir}/dellWirelessCtl
# (tpg) wtf is yum ? ;)
rm -rf %{buildroot}%{_prefix}/lib/yum-plugins
rm -rf %{buildroot}%{_sysconfdir}/yum
%find_lang %{name}
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.%{major}*
%files -n %{develname}
%defattr(-,root,root)
%{_includedir}/smbios*
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/libsmbios*.pc
%files utils -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS README TODO ChangeLog doc/*
%config(noreplace) %{_sysconfdir}/%{name}/*.conf
%{_sbindir}/*
%{_bindir}/*
%{_datadir}/smbios-utils
%{python_sitelib}/%{name}_c