# # spec file for package libsmbios (Version MACRO) # # Copyright (c) 2008 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++ glibc-devel 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: 10 License: BSD 3-Clause; GPL v2 or later; Other uncritical OpenSource License Source: %{name}-%{version}.tar.bz2 Patch0: libsmbios-fix-compiler_warning_cgcc.diff 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 %LIBNAME %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 %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 %patch0 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} %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 * Fri Nov 07 2008 dkukawka@suse.de - fixed spec: - added Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*) for libsmbios2 and libsmbios-bin to fix bnc#440814 * Wed Aug 13 2008 ro@suse.de - change ExcludeArch to ExclusiveArch * Tue Jul 29 2008 coolo@suse.de - obsolete old name * Mon Jul 07 2008 dkukawka@suse.de - change naming of the lib package because of 'Shared Library Packaging Policy' and rpmlint - updated to latest version v2.0.2 * Mon Jun 02 2008 dkukawka@suse.de - added: 'Supplements: modalias(dmi:*:[bs]vnD[Ee][Ll][Ll]*:*)' to specfile to get the package installed on Dell machines (fix for bnc#326765) * Mon Mar 10 2008 crrodriguez@suse.de - dont buildrequire libxml, only libxml2 is used * Fri Mar 07 2008 dmueller@suse.de - fix documentation permissions * Tue Jan 08 2008 dkukawka@suse.de - added new patch: - libsmbios-fix-compiler_warning_cgcc.diff * Sat Dec 29 2007 crrodriguez@suse.de - fix library-without-ldconfig-postun errors * Wed Dec 19 2007 dkukawka@suse.de - updated to new version 0.13.13 * Sun Nov 04 2007 dkukawka@suse.de - updated to new version 0.13.12: - removed upstream gone patch: - libsmbios-fix-includes.diff - fixed spec-file: - binaries moved from /usr/bin to /usr/sbin * Tue Oct 16 2007 dkukawka@suse.de - updated to new version 0.13.10: - Fix a couple of failure-to-check-return on fopen. most were unit-test code only, but two or three were in regular code. - Add hinting to the memory class, so that it can intelligently close /dev/mem file handle when it is not needed (which is most of the time). it only leaves it open when it is scanning, so speed is not impacted. - new upstream - added patches: - libsmbios-fix-includes.diff: fix missing includes (needed to build in beta tree) * 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