345c1c45de
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libsmbios?expand=0&rev=24
275 lines
9.2 KiB
RPMSpec
275 lines
9.2 KiB
RPMSpec
#
|
|
# spec file for package libsmbios
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products 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/
|
|
#
|
|
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
|
Name: libsmbios
|
|
Version: 2.2.26
|
|
Release: 1
|
|
Summary: Libraries to get information from standard BIOS tables
|
|
|
|
License: GPLv2+ or OSL 2.1
|
|
Url: http://linux.dell.com/libsmbios/main/
|
|
Group: System/Management
|
|
Source0: http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-%{version}/%{name}-%{version}.tar.bz2
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: doxygen
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libcppunit-devel
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python-base
|
|
# Modules: dcdbas.ko
|
|
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
|
|
# Generated with: extract-modaliases dcdbas
|
|
# libsmbios only ever makes sense on intel compatible arches, no DMI tables on ppc, s390, etc.
|
|
ExclusiveArch: ia64 %{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 devel
|
|
Summary: Development headers and archives
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libsmbios2 = %{version}
|
|
Requires: libstdc++-devel
|
|
|
|
%description devel
|
|
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.
|
|
|
|
%package -n libsmbios2
|
|
Summary: Libraries to get information from standard BIOS tables
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: System/Management
|
|
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
|
|
Obsoletes: libsmbios-libs <= 0.13.12
|
|
Provides: libsmbios-libs = %{version}
|
|
|
|
%description -n libsmbios2
|
|
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 python-smbios
|
|
Summary: Python interface to Libsmbios C library
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: Development/Libraries/Python
|
|
Requires: libsmbios2 = %{version}
|
|
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
|
|
%if %{?suse_version: 0%{?suse_version} > 1110} %{!?suse_version:1}
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description -n python-smbios
|
|
This package provides a Python interface to libsmbios.
|
|
|
|
%package -n smbios-utils
|
|
Summary: Meta-package that pulls in all smbios binaries and python scripts
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: System/Management
|
|
Requires: smbios-utils-bin
|
|
Requires: smbios-utils-python
|
|
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
|
|
Obsoletes: libsmbios-bin <= 2.0.2
|
|
Provides: libsmbios-bin = %{version}
|
|
Obsoletes: libsmbios-unsupported-bin <= 2.0.2
|
|
Provides: libsmbios-unsupported-bin = %{version}
|
|
|
|
%description -n smbios-utils
|
|
This is a meta-package that pulls in the binary libsmbios executables as well
|
|
as the python executables.
|
|
|
|
%package -n smbios-utils-bin
|
|
Summary: Binary utilities that use libsmbios
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: System/Management
|
|
Requires: libsmbios2 = %{version}
|
|
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
|
|
|
|
%description -n smbios-utils-bin
|
|
Get BIOS information, such as System product name, product id, service tag and
|
|
asset tag.
|
|
|
|
%package -n smbios-utils-python
|
|
Summary: Python executables that use libsmbios
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: System/Management
|
|
Requires: python-smbios = %{version}
|
|
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
|
|
|
|
%description -n smbios-utils-python
|
|
Get BIOS information, such as System product name, product id, service tag and
|
|
asset tag. Set service and asset tags on Dell machines. Manipulate wireless
|
|
cards/bluetooth on Dell laptops. Set BIOS password on select Dell systems.
|
|
Update BIOS on select Dell systems. Set LCD brightness on select Dell laptops.
|
|
|
|
%package -n yum-dellsysid
|
|
Summary: YUM plugin to retrieve the Dell System ID
|
|
License: GPLv2+ or OSL 2.1
|
|
Group: System/Packages
|
|
# yum plugin and supporting functions first appeared in 2.2.0
|
|
Requires: smbios-utils-python >= 2.2.0
|
|
Requires: yum
|
|
|
|
%description -n yum-dellsysid
|
|
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 a YUM plugin which allows the use of certain
|
|
substitutions in yum repository configuration files on Dell systems.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%configure --disable-rpath
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%makeinstall
|
|
|
|
# Install headers
|
|
install -dp -m 0755 %{buildroot}%{_includedir}
|
|
cp -a src/include/* %{buildroot}/%{_includedir}/
|
|
cp -a out/public-include/* %{buildroot}/%{_includedir}/
|
|
|
|
#
|
|
find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r configure.ac {} \;
|
|
|
|
# Remove *.la files (package provides pkg-config files), remove static libraries
|
|
rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
|
|
|
|
# Prepare doc files for devel package
|
|
mv out/libsmbios_c out/libsmbios_c-%{_arch}
|
|
mv out/libsmbios_c++ out/libsmbios_c++-%{_arch}
|
|
|
|
# Manually install the doc files for the devel package in order to fix duplicates with "fdupes -s"
|
|
install -dp -m 0755 %{buildroot}%{_defaultdocdir}/%{name}-devel
|
|
cp -a out/libsmbios_c-%{_arch} %{buildroot}%{_defaultdocdir}/%{name}-devel/
|
|
cp -a out/libsmbios_c++-%{_arch} %{buildroot}%{_defaultdocdir}/%{name}-devel/
|
|
|
|
#
|
|
rename libsmbios.mo libsmbios-2.2-x86_64.mo $(find %{buildroot}/%{_datadir} -name libsmbios.mo)
|
|
# Remove unneeded locales
|
|
%if 0%{?suse_version} < 1140
|
|
rm -rf %{buildroot}%{_datadir}/locale/en/
|
|
rm -rf %{buildroot}%{_datadir}/locale/en@boldquot/
|
|
rm -rf %{buildroot}%{_datadir}/locale/en@quot/
|
|
%endif
|
|
%find_lang %{name}-2.2-x86_64
|
|
|
|
# Backwards compatible symlinks
|
|
ln -s %{_sbindir}/dellWirelessCtl %{buildroot}%{_bindir}/dellWirelessCtl
|
|
ln -s smbios-lcd-brightness %{buildroot}%{_sbindir}/dellLcdBrightness
|
|
ln -s smbios-rbu-bios-update %{buildroot}%{_sbindir}/dellBiosUpdate
|
|
ln -s smbios-sys-info %{buildroot}%{_sbindir}/getSystemId
|
|
ln -s smbios-wireless-ctl %{buildroot}%{_sbindir}/dellWirelessCtl
|
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%post -n libsmbios2 -p /sbin/ldconfig
|
|
|
|
%postun -n libsmbios2 -p /sbin/ldconfig
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%doc %{_defaultdocdir}/%{name}-devel/
|
|
%{_includedir}/smbios/
|
|
%{_includedir}/smbios_c/
|
|
%{_libdir}/libsmbios.so
|
|
%{_libdir}/libsmbios_c.so
|
|
%{_libdir}/pkgconfig/libsmbios_c*.pc
|
|
|
|
%files -n libsmbios2 -f %{name}-2.2-x86_64.lang
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS COPYING-GPL COPYING-OSL ChangeLog NEWS README TODO doc/old_news.txt
|
|
%doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
|
|
%{_libdir}/libsmbios.so.*
|
|
%{_libdir}/libsmbios_c.so.*
|
|
|
|
%files -n python-smbios
|
|
%defattr(-,root,root,-)
|
|
%{python_sitelib}/libsmbios_c/
|
|
|
|
%files -n smbios-utils
|
|
%defattr(-,root,root,-)
|
|
%doc COPYING-GPL COPYING-OSL README
|
|
|
|
%files -n smbios-utils-bin
|
|
%defattr(-,root,root,-)
|
|
%doc doc/pkgheader.sh
|
|
%defattr(555,root,root,-)
|
|
# legacy C++
|
|
%{_sbindir}/dellBiosUpdate-compat
|
|
%{_sbindir}/dellLEDCtl
|
|
%ifnarch ia64
|
|
%{_sbindir}/dellMediaDirectCtl
|
|
%endif
|
|
# new C utilities
|
|
%{_sbindir}/smbios-get-ut-data
|
|
%{_sbindir}/smbios-state-byte-ctl
|
|
%{_sbindir}/smbios-sys-info-lite
|
|
%{_sbindir}/smbios-upflag-ctl
|
|
|
|
%files -n smbios-utils-python
|
|
%defattr(-,root,root,-)
|
|
%dir %{_sysconfdir}/libsmbios
|
|
%config(noreplace) %{_sysconfdir}/libsmbios/*
|
|
%defattr(555,root,root,-)
|
|
# used by HAL in old location, so keep it around until HAL is updated
|
|
%{_bindir}/dellWirelessCtl
|
|
# python utilities
|
|
%{_sbindir}/smbios-lcd-brightness
|
|
%{_sbindir}/smbios-passwd
|
|
%{_sbindir}/smbios-rbu-bios-update
|
|
%{_sbindir}/smbios-sys-info
|
|
%{_sbindir}/smbios-token-ctl
|
|
%{_sbindir}/smbios-wakeup-ctl
|
|
%{_sbindir}/smbios-wireless-ctl
|
|
# backwards compatible symlinks
|
|
%{_sbindir}/dellBiosUpdate
|
|
%{_sbindir}/dellLcdBrightness
|
|
%{_sbindir}/dellWirelessCtl
|
|
%{_sbindir}/getSystemId
|
|
%defattr(-,root,root,-)
|
|
# data files
|
|
%{_datadir}/smbios-utils/
|
|
|
|
%files -n yum-dellsysid
|
|
%defattr(-,root,root,-)
|
|
# YUM Plugin
|
|
%dir %{_sysconfdir}/yum
|
|
%dir %{_sysconfdir}/yum/pluginconf.d
|
|
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/dellsysid.conf
|
|
%dir %{_exec_prefix}/lib/yum-plugins
|
|
%{_exec_prefix}/lib/yum-plugins/dellsysid.*
|
|
|
|
%changelog
|