2007-01-16 00:23:15 +01:00
|
|
|
#
|
2011-03-21 10:18:21 +01:00
|
|
|
# spec file for package libsmbios
|
2007-01-16 00:23:15 +01:00
|
|
|
#
|
2020-01-25 23:49:56 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2007-01-16 00:23:15 +01:00
|
|
|
#
|
2008-08-13 18:17:23 +02:00
|
|
|
# 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.
|
|
|
|
|
2018-11-21 17:03:47 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:23:15 +01:00
|
|
|
#
|
|
|
|
|
2011-03-21 10:18:33 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%define libname libsmbios_c2
|
2018-04-04 15:52:45 +02:00
|
|
|
Name: libsmbios
|
2018-11-21 17:03:47 +01:00
|
|
|
Version: 2.4.2
|
2018-04-09 17:14:43 +02:00
|
|
|
Release: 0
|
2018-04-04 15:52:45 +02:00
|
|
|
Summary: SMBIOS table library and utilities
|
2018-03-26 11:07:27 +02:00
|
|
|
License: GPL-2.0-or-later OR OSL-2.1
|
2018-04-04 15:52:45 +02:00
|
|
|
Group: Hardware/Other
|
2018-04-09 17:14:43 +02:00
|
|
|
URL: https://github.com/dell/libsmbios
|
2018-11-21 17:03:47 +01:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
|
|
|
Source1: %{name}-rpmlintrc
|
2020-01-25 23:49:56 +01:00
|
|
|
|
2018-03-26 11:07:27 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2018-04-09 17:14:43 +02:00
|
|
|
BuildRequires: chrpath
|
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gettext
|
|
|
|
BuildRequires: help2man
|
|
|
|
BuildRequires: libcppunit-devel
|
2018-03-26 11:07:27 +02:00
|
|
|
BuildRequires: libtool
|
2018-04-09 17:14:43 +02:00
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: pkgconfig
|
2018-02-27 10:50:39 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-04-09 17:14:43 +02:00
|
|
|
BuildRequires: python3-devel
|
2017-10-07 12:08:23 +02:00
|
|
|
# libsmbios only ever makes sense on intel compatible arches
|
|
|
|
# no DMI tables on ppc, s390, etc.
|
|
|
|
ExclusiveArch: x86_64 ia64 %{ix86}
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2017-10-07 12:08:23 +02:00
|
|
|
%description
|
2018-04-04 15:52:45 +02:00
|
|
|
libsmbios provides a library to interface with the SMBIOS tables. It
|
|
|
|
also provides extensions for proprietary methods of interfacing with
|
|
|
|
Dell specific SMBIOS tables.
|
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%lang_package
|
2018-04-04 15:52:45 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%package -n %{libname}
|
2018-04-04 15:52:45 +02:00
|
|
|
Summary: SMBIOS table interface library
|
|
|
|
Group: System/Libraries
|
2018-05-23 16:30:51 +02:00
|
|
|
# For the above lang package to be resolvable
|
|
|
|
Provides: %{name} = %{version}
|
|
|
|
Obsoletes: libsmbios2
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%description -n %{libname}
|
2018-04-04 15:52:45 +02:00
|
|
|
libsmbios provides a library to interface with the SMBIOS tables. It
|
|
|
|
also provides extensions for proprietary methods of interfacing with
|
|
|
|
Dell specific SMBIOS tables.
|
|
|
|
|
|
|
|
This package provides the C API library.
|
2007-10-16 18:21:08 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%package -n python3-smbios
|
2011-03-21 10:18:21 +01:00
|
|
|
Summary: Python interface to Libsmbios C library
|
2018-02-27 10:50:39 +01:00
|
|
|
Group: System/Libraries
|
2018-04-09 17:14:43 +02:00
|
|
|
Requires: %{libname} = %{version}
|
|
|
|
# We provide only python3 bindings thus obsolete the old ones
|
|
|
|
Obsoletes: python-smbios
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%description -n python3-smbios
|
2017-10-07 12:08:23 +02:00
|
|
|
This package provides a Python interface to libsmbios
|
|
|
|
|
|
|
|
%package -n smbios-utils
|
2018-04-09 17:14:43 +02:00
|
|
|
Summary: Utilities that use libsmbios
|
2018-02-27 10:50:39 +01:00
|
|
|
Group: System/Management
|
2018-04-09 17:14:43 +02:00
|
|
|
Recommends: python3-smbios-utils = %{version}
|
|
|
|
# Give away the bin subpkg and just pull them all here instead of playing with
|
|
|
|
# metapackages
|
|
|
|
Provides: libsmbios-bin = %{version}
|
2018-05-23 16:30:51 +02:00
|
|
|
Provides: smbios-utils-bin
|
2018-04-09 17:14:43 +02:00
|
|
|
Obsoletes: libsmbios-bin < %{version}
|
|
|
|
Provides: libsmbios-unsupported-bin = %{version}
|
|
|
|
Obsoletes: libsmbios-unsupported-bin < %{version}
|
2017-10-07 12:08:23 +02:00
|
|
|
|
|
|
|
%description -n smbios-utils
|
2011-03-21 10:18:21 +01:00
|
|
|
Get BIOS information, such as System product name, product id, service tag and
|
|
|
|
asset tag.
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%package -n python3-smbios-utils
|
2011-03-21 10:18:21 +01:00
|
|
|
Summary: Python executables that use libsmbios
|
2018-02-27 10:50:39 +01:00
|
|
|
Group: System/Management
|
2018-04-09 17:14:43 +02:00
|
|
|
Requires: python3-smbios = %{version}
|
|
|
|
# Former name replacement
|
|
|
|
Provides: smbios-utils-python = %{version}
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%description -n python3-smbios-utils
|
2011-03-21 10:18:21 +01:00
|
|
|
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.
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2017-10-07 12:08:23 +02:00
|
|
|
%package -n libsmbios-devel
|
|
|
|
Summary: Development headers and archives
|
2018-02-27 10:50:39 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-04-09 17:14:43 +02:00
|
|
|
Requires: %{libname} = %{version}
|
|
|
|
Provides: libsmbios2-devel = %{version}
|
|
|
|
Obsoletes: libsmbios2-devel < %{version}
|
2017-10-07 12:08:23 +02:00
|
|
|
|
|
|
|
%description -n libsmbios-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.
|
|
|
|
|
2011-03-21 10:18:21 +01:00
|
|
|
%prep
|
2020-01-25 23:49:56 +01:00
|
|
|
%autosetup -p1
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2011-03-21 10:18:21 +01:00
|
|
|
%build
|
2018-04-09 17:14:43 +02:00
|
|
|
autoreconf -fvi
|
|
|
|
export CFLAGS="%{optflags} -fPIE"
|
|
|
|
export LDFLAGS="-pie"
|
2017-10-07 12:08:23 +02:00
|
|
|
%configure \
|
2020-01-25 23:49:56 +01:00
|
|
|
--disable-static \
|
|
|
|
--enable-nls \
|
|
|
|
--enable-python \
|
|
|
|
--enable-as-needed \
|
|
|
|
--enable-doxygen \
|
|
|
|
%{nil}
|
|
|
|
%make_build
|
2011-05-14 02:49:02 +02:00
|
|
|
|
2017-10-07 12:08:23 +02:00
|
|
|
%install
|
2018-04-09 17:14:43 +02:00
|
|
|
%make_install
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2017-10-07 12:08:23 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
# remove rpath from binaries
|
|
|
|
chrpath --replace '$ORIGIN' %{buildroot}%{_sbindir}/smbios-sys-info-lite
|
2017-10-07 12:08:23 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
# python3 duplicates
|
|
|
|
%fdupes %{buildroot}%{python3_sitearch}
|
2018-02-27 10:50:39 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
# include files
|
|
|
|
mkdir -p %{buildroot}/%{_includedir}
|
2018-11-21 17:03:47 +01:00
|
|
|
cd src/include
|
|
|
|
find . -name "*.h" -exec install -m 0644 -D {} %{buildroot}/%{_includedir}/{} \;
|
|
|
|
cd ../..
|
2018-04-09 17:14:43 +02:00
|
|
|
cp -a out/public-include/* %{buildroot}%{_includedir}/
|
2017-10-07 12:08:23 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%find_lang %{name}
|
2017-10-07 12:08:23 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
# backwards compatible
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
ln -s %{_sbindir}/smbios-wireless-ctl %{buildroot}/%{_bindir}/dellWirelessCtl
|
2017-10-07 12:08:23 +02:00
|
|
|
ln -s smbios-sys-info %{buildroot}/%{_sbindir}/getSystemId
|
|
|
|
ln -s smbios-wireless-ctl %{buildroot}/%{_sbindir}/dellWirelessCtl
|
|
|
|
ln -s smbios-lcd-brightness %{buildroot}/%{_sbindir}/dellLcdBrightness
|
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%check
|
|
|
|
make %{?_smp_mflags} check
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%license COPYING-GPL COPYING-OSL
|
|
|
|
%license src/bin/getopts_LICENSE.txt
|
2017-10-07 12:08:23 +02:00
|
|
|
%{_libdir}/libsmbios_c.so.*
|
2020-01-25 23:49:56 +01:00
|
|
|
%{_datadir}/locale/en/
|
2008-03-05 22:38:04 +01:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%files lang -f %{name}.lang
|
2020-01-25 23:49:56 +01:00
|
|
|
# english locale should be in the main package
|
|
|
|
%exclude %{_datadir}/locale/en
|
2018-04-04 15:52:45 +02:00
|
|
|
|
2018-04-09 17:14:43 +02:00
|
|
|
%files -n libsmbios-devel
|
2017-10-07 12:08:23 +02:00
|
|
|
%{_includedir}/smbios
|
|
|
|
%{_includedir}/smbios_c
|
2011-03-21 10:18:21 +01:00
|
|
|
%{_libdir}/libsmbios_c.so
|
2017-10-07 12:08:23 +02:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2007-01-16 00:23:15 +01:00
|
|
|
|
2017-10-07 12:08:23 +02:00
|
|
|
%files -n smbios-utils
|
2018-04-09 17:14:43 +02:00
|
|
|
# C utilities
|
2011-03-21 10:18:21 +01:00
|
|
|
%{_sbindir}/smbios-state-byte-ctl
|
2018-04-09 17:14:43 +02:00
|
|
|
%{_mandir}/man?/smbios-state-byte-ctl.*
|
2017-10-07 12:08:23 +02:00
|
|
|
%{_sbindir}/smbios-get-ut-data
|
2018-04-09 17:14:43 +02:00
|
|
|
%{_mandir}/man?/smbios-get-ut-data.*
|
2011-03-21 10:18:21 +01:00
|
|
|
%{_sbindir}/smbios-upflag-ctl
|
2018-04-09 17:14:43 +02:00
|
|
|
%{_mandir}/man?/smbios-upflag-ctl.*
|
2017-10-07 12:08:23 +02:00
|
|
|
%{_sbindir}/smbios-sys-info-lite
|
2018-04-09 17:14:43 +02:00
|
|
|
%{_mandir}/man?/smbios-sys-info-lite.*
|
|
|
|
|
|
|
|
%files -n python3-smbios
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
|
|
|
|
%files -n python3-smbios-utils
|
|
|
|
%dir %{_sysconfdir}/libsmbios
|
|
|
|
%config(noreplace) %{_sysconfdir}/libsmbios/*
|
|
|
|
# python utilities
|
|
|
|
%{_sbindir}/smbios-battery-ctl
|
|
|
|
%{_mandir}/man?/smbios-battery-ctl.*
|
|
|
|
%{_sbindir}/smbios-sys-info
|
|
|
|
%{_mandir}/man?/smbios-sys-info.*
|
|
|
|
%{_sbindir}/smbios-token-ctl
|
|
|
|
%{_mandir}/man?/smbios-token-ctl.*
|
|
|
|
%{_sbindir}/smbios-passwd
|
|
|
|
%{_mandir}/man?/smbios-passwd.*
|
|
|
|
%{_sbindir}/smbios-wakeup-ctl
|
|
|
|
%{_mandir}/man?/smbios-wakeup-ctl.*
|
|
|
|
%{_sbindir}/smbios-wireless-ctl
|
|
|
|
%{_mandir}/man?/smbios-wireless-ctl.*
|
|
|
|
%{_sbindir}/smbios-lcd-brightness
|
|
|
|
%{_mandir}/man?/smbios-lcd-brightness.*
|
|
|
|
%{_sbindir}/smbios-keyboard-ctl
|
|
|
|
%{_mandir}/man?/smbios-keyboard-ctl.*
|
|
|
|
%{_sbindir}/smbios-thermal-ctl
|
|
|
|
%{_mandir}/man?/smbios-thermal-ctl.*
|
|
|
|
# used by HAL in old location, so keep it around until HAL is updated.
|
|
|
|
%{_sbindir}/dellLcdBrightness
|
|
|
|
%{_sbindir}/getSystemId
|
|
|
|
%{_sbindir}/dellWirelessCtl
|
|
|
|
%{_bindir}/dellWirelessCtl
|
|
|
|
# data files
|
|
|
|
%{_datadir}/smbios-utils
|
2011-03-21 10:18:21 +01:00
|
|
|
|
2007-03-05 00:24:53 +01:00
|
|
|
%changelog
|