libsmbios/libsmbios.spec

292 lines
8.2 KiB
RPMSpec

#
# spec file for package libsmbios (Version 0.13.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libsmbios
BuildRequires: Xerces-c-devel cppunit-devel gcc-c++ glibc-devel libxml 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 xml
%define build_xml %( ([ -e /usr/include/xercesc/ ] && echo 1) || echo 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 0
%define minor 13
%define sub 6
%define extralevel %{nil}
%define release_name libsmbios
%define release_version %{major}.%{minor}.%{sub}%{extralevel}
Version: 0.13.6
Release: 1
License: BSD License and BSD-like, GNU General Public License (GPL)
Source: %{name}-%{version}.tar.bz2
Summary: Open BIOS parsing libs
Group: System/Management
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: ppc ppc64 s390 s390x
%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
%package libs
Summary: Libsmbios shared libraries.
Group: System/Management
Provides: %name = %version
%package -n libsmbiosxml-libs
Summary: Libsmbiosxml shared libraries.
Group: System/Management
%package bin
Summary: The "supported" sample binaries that use libsmbios
Group: System/Management
%package unsupported-bin
Summary: Unsupported sample binaries using libsmbios
Group: System/Management
%package -n libsmbiosxml-bin
Summary: sample binaries that use libsmbiosxml
Group: System/Management
%package devel
Summary: development headers and archives
Group: System/Management
%package static
Summary: Open BIOS parsing libs
Group: System/Management
%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
%description -n libsmbiosxml-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
%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 -n libsmbiosxml-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
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
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
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/usr/include
cp -a include/smbios %{buildroot}/usr/include/
rm -f %{buildroot}/%{_libdir}/lib*.la
rm -f %{buildroot}/%{_libdir}/lib*.a
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
%post libs
ldconfig
%post -n libsmbiosxml-libs
ldconfig
%files libs
%defattr(-,root,root)
%{_libdir}/libsmbios.so.*.*
%if %{build_xml}
%files -n libsmbiosxml-libs
%defattr(-,root,root)
%{_libdir}/libsmbiosxml.so.*.*
%endif
%files devel
%defattr(-,root,root)
%doc COPYING-GPL COPYING-OSL README bin-unsupported/getopts_LICENSE.txt
%if %{build_docs}
%doc doc/full/html
%endif
%{_libdir}/libsmbios.so
%{_libdir}/libsmbios.so.1
%{_libdir}/libsmbiosxml.so
%{_libdir}/libsmbiosxml.so.1
/usr/include/smbios
%files bin
%defattr(555,root,root)
%doc COPYING-GPL COPYING-OSL README
%{_bindir}/assetTag
%{_bindir}/dellBiosUpdate
%{_bindir}/getSystemId
%{_bindir}/propertyTag
%{_bindir}/serviceTag
%{_bindir}/tokenCtl
%{_bindir}/verifySmiPassword
%{_bindir}/wakeupCtl
%{_bindir}/dellLcdBrightness
%{_bindir}/dellWirelessCtl
%files unsupported-bin
%defattr(555,root,root)
%doc COPYING-GPL COPYING-OSL README include/smbios/config/boost_LICENSE_1_0_txt bin-unsupported/getopts_LICENSE.txt
%{_bindir}/activateCmosToken
%{_bindir}/ascii2enUS_scancode
%{_bindir}/createUnitTestFiles
%{_bindir}/disable_console_redir
%{_bindir}/dumpCmos
%{_bindir}/dellLEDCtl
%{_bindir}/getPasswordFormat
%{_bindir}/isCmosTokenActive
%{_bindir}/probes
%{_bindir}/smitest
%{_bindir}/stateByteCtl
%{_bindir}/upBootCtl
%if %{build_xml}
%files -n libsmbiosxml-bin
%defattr(555,root,root)
%{_bindir}/dumpSmbios
%endif
%if %{build_static}
%files static
%defattr(555,root,root)
%{_bindir}/*S
%endif
%changelog
* Wed May 02 2007 - dkukawka@suse.de
- updated to new version 0.13.6:
- critical bugfix to dellBiosUpdate utility to fix packet mode
- autoconf/automake support for automatically building docs
- more readable 'make' lines by splitting out env vars
- remove run_cppunit option... always run unit tests.
- update autoconf/automake utilities to latest version
- fix LDFLAGS to not overwrite user entered LDFLAGS
- add automatic doxygen build of docs
- fix urls of public repos
- remove yum repo page in favor of official page from docs
- split dmi table entry point from smbios table entry point
- support legacy _DMI_ tables
- fix support for EFI-based imacs without proper _SM_ anchor
* Mon Mar 26 2007 - dkukawka@suse.de
- updated to new version 0.13.4 as requested by DELL maintainer
- autotools conversion
- new util dellWirelessCtl to control builtin wireless on Dell
laptops
* Sun Mar 04 2007 - dkukawka@suse.de
- fixed spec file: removed 'rm -rf ${RPM_BUILD_ROOT}' from install
section
- added ExcludeArch for ppc/ppc64 and s390/s390x
* Wed Feb 28 2007 - dkukawka@suse.de
- updated to new version 0.12.4:
* the package no longer provide bios_update_tools subpackage,
since they are no longer part of the source
* Fri Feb 10 2006 - bwise@suse.de
- put description ib bios_update_check
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 19 2006 - ro@suse.de
- provide main package name in one subpackage
(needed for debuginfo since we do not have a main package here)
* Wed Jan 11 2006 - bwhiteley@suse.de
- first build