libsmbios/libsmbios.spec
OBS User autobuild 55645bb1bd Accepting request 24434 from Base:System
Copy from Base:System/libsmbios based on submit request 24434 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/24434
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libsmbios?expand=0&rev=18
2009-11-16 13:33:40 +00:00

268 lines
7.3 KiB
RPMSpec

#
# spec file for package libsmbios (Version 2.0.2)
#
# Copyright (c) 2009 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/
#
Name: libsmbios
BuildRequires: Xerces-c-devel cppunit-devel gcc-c++ libxml2-devel tree
Url: http://linux.dell.com/libsmbios/main/index.html
%define _unpackaged_files_terminate_build 0
%define build_static 0
# automatically determine if we should build docs
%define build_docs %( ( which doxygen > /dev/null 2>&1 && echo 1) || echo 0 )
%define run_cppunit %( ([ -e /usr/include/cppunit ] && echo 1) || echo 0)
%{?_without_docs: %{expand: %%define build_docs 0}}
%{?_with_docs: %{expand: %%define build_docs 1}}
%{?_without_cppunit: %{expand: %%define run_cppunit 0}}
%{?_with_cppunit: %{expand: %%define run_cppunit 1}}
%define major 2
%define minor 0
%define sub 2
%define extralevel %{nil}
%define release_name libsmbios
%define release_version %{major}.%{minor}.%{sub}%{extralevel}
%define LIBNAME libsmbios2
Version: %{major}.%{minor}.%{sub}
Release: 2
License: BSD 3-clause (or similar) ; GPL v2 or later ; Other uncritical OpenSource License
Source: %{name}-%{version}.tar.bz2
Patch0: libsmbios-fix-compiler_warning_cgcc.diff
Patch1: libsmbios-2.0.2-gcc44.patch
Summary: Open BIOS parsing libs
Group: System/Management
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 ia64 x86_64
# Modules: dcdbas.ko
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
# Generated with: extract-modaliases dcdbas
%description
Libsmbios is a library and utilites that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
Authors:
--------
Michael Brown
%if 0%{?suse_version} < 1100
%package libs
License: GPL v2 or later
%else
%package -n libsmbios2
License: BSD 3-clause (or similar) ; GPL v2 or later ; Other uncritical OpenSource License
%endif
Summary: Libsmbios shared libraries
Group: System/Management
Provides: %name = %version
Obsoletes: libsmbios-libs <= 0.13.12
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
%package bin
License: GPL v2 or later
Summary: The "supported" sample binaries that use libsmbios
Group: System/Management
Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)
%package unsupported-bin
License: GPL v2 or later
Summary: Unsupported sample binaries using libsmbios
Group: System/Management
%package devel
License: GPL v2 or later
Summary: development headers and archives
Group: System/Management
Requires: libstdc++-devel
%package static
License: GPL v2 or later ; Other uncritical OpenSource License
Summary: Open BIOS parsing libs
Group: System/Management
%if 0%{?suse_version} < 1100
%description libs
Libsmbios is a library and utilites that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
Authors:
--------
Michael Brown
%else
%description -n %LIBNAME
%endif
Libsmbios is a library and utilites that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
Authors:
--------
Michael Brown
%description devel
Libsmbios is a library and utilites 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
Authors:
--------
Michael Brown
%description bin
Libsmbios is a library and utilites 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.
Authors:
--------
Michael Brown
%description unsupported-bin
Libsmbios is a library and utilites 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.
Authors:
--------
Michael Brown
%description static
Libsmbios is a library and utilites that can be used by client programs
to get information from standard BIOS tables, such as the SMBIOS table.
Authors:
--------
Michael Brown
%prep
%setup -q
%patch0
%patch1
find . -type d -exec chmod -f 755 {} \;
find doc include libraries bin-supported bin-unsupported build cppunit -type f -exec chmod -f 644 {} \;
%build
%configure --disable-static --with-pic
make %{?_smp_mflags} EXTRA_CXXFLAGS="%{optflags}" EXTRA_CFLAGS="%{optflags}" -e RELEASE_MAJOR=%{major} RELEASE_MINOR=%{minor} RELEASE_SUBLEVEL=%{sub} RELEASE_EXTRALEVEL=%{extralevel}
%if %{build_docs}
make -e RELEASE_MAJOR=%{major} RELEASE_MINOR=%{minor} RELEASE_SUBLEVEL=%{sub} RELEASE_EXTRALEVEL=%{extralevel} doxygen
%endif
%if %{run_cppunit}
make -e EXTRA_CXXFLAGS="%{optflags}" EXTRA_CFLAGS="%{optflags}" RELEASE_MAJOR=%{major} RELEASE_MINOR=%{minor} RELEASE_SUBLEVEL=%{sub} RELEASE_EXTRALEVEL=%{extralevel} unit_test
%endif
%install
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/usr/include
cp -a include/smbios %{buildroot}/usr/include/
rm -vf %{buildroot}/%{_libdir}/lib*.la
rm -fv %{buildroot}/%{_libdir}/lib*.a
%clean
rm -rf ${RPM_BUILD_ROOT}
%if 0%{?suse_version} < 1100
%post libs -p /sbin/ldconfig
%else
%post -n %LIBNAME -p /sbin/ldconfig
%endif
%if 0%{?suse_version} < 1100
%postun libs -p /sbin/ldconfig
%else
%postun -n %LIBNAME -p /sbin/ldconfig
%endif
%if 0%{?suse_version} < 1100
%files libs
%else
%files -n %LIBNAME
%endif
%defattr(-,root,root)
%{_libdir}/libsmbios.so.*
%files devel
%defattr(-,root,root)
%doc COPYING-GPL COPYING-OSL README bin-unsupported/getopts_LICENSE.txt
%if %{build_docs}
%doc doc/full/html
%endif
/usr/include/smbios
%{_libdir}/libsmbios.so
%files bin
%defattr(644,root,root,755)
%doc COPYING-GPL COPYING-OSL README
%defattr(555,root,root)
%{_sbindir}/assetTag
%{_sbindir}/dellBiosUpdate
%{_sbindir}/getSystemId
%{_sbindir}/propertyTag
%{_sbindir}/serviceTag
%{_sbindir}/verifySmiPassword
%{_sbindir}/wakeupCtl
%{_sbindir}/dellLcdBrightness
%{_sbindir}/dellWirelessCtl
%{_sbindir}/mkbiospkg.sh
%files unsupported-bin
%defattr(644,root,root,755)
%doc COPYING-GPL COPYING-OSL README include/smbios/config/boost_LICENSE_1_0_txt bin-unsupported/getopts_LICENSE.txt
%defattr(555,root,root)
%{_sbindir}/activateCmosToken
%{_sbindir}/ascii2enUS_scancode
%{_sbindir}/createUnitTestFiles
%{_sbindir}/disable_console_redir
%{_sbindir}/dumpCmos
%{_sbindir}/dellLEDCtl
%{_sbindir}/getPasswordFormat
%{_sbindir}/isCmosTokenActive
%{_sbindir}/probes
%{_sbindir}/smitest
%{_sbindir}/stateByteCtl
%{_sbindir}/upBootCtl
%{_sbindir}/dumpSmbios
%if %{build_static}
%files static
%defattr(555,root,root)
%{_bindir}/*S
%endif
%changelog