d5edb4e
# these are all substituted by autoconf
89ac544
%define major 0
89ac544
%define minor 13
d5edb4e
%define sub 9
89ac544
%define extralevel %{nil}
89ac544
%define release_name libsmbios
89ac544
%define release_version %{major}.%{minor}.%{sub}%{extralevel}
89ac544
89ac544
Name: %{release_name}
89ac544
Version: %{release_version}
573e129
Release: 1%{?dist}
d5edb4e
License: GPLv2+ or OSL
89ac544
Group: System Environment/Libraries
89ac544
Source: http://linux.dell.com/libsmbios/download/%{name}/%{name}-%{version}/%{name}-%{version}.tar.gz
89ac544
URL: http://linux.dell.com/libsmbios/main
89ac544
Summary: Open BIOS parsing libs
89ac544
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
89ac544
89ac544
# libsmbios only ever makes sense on intel compatible arches
89ac544
# no DMI tables on ppc, s390, etc.
89ac544
ExclusiveArch: x86_64 ia64 %{ix86}
89ac544
89ac544
BuildRequires: libxml2-devel
89ac544
573e129
#EPEL4/5 dont have cppunit/cppunit-devel, so skip build tests
573e129
# everything else should be able to pull in cppunit to run unit tests
573e129
# during build. Doesnt affect binaries produced, so doesnt affect
573e129
# build reproducability.
573e129
%if %(test "%{dist}" != ".el4" -a "%{dist}" != ".el5" && echo 1 || echo 0)
573e129
BuildRequires: cppunit-devel
573e129
%endif
573e129
573e129
# no doxygen native for suse
573e129
%if %(test ! -e /etc/SuSE-release && echo 1 || echo 0)
573e129
BuildRequires: doxygen
573e129
%endif
573e129
89ac544
%description
89ac544
Libsmbios is a library and utilities that can be used by client programs 
89ac544
to get information from standard BIOS tables, such as the SMBIOS table.
89ac544
89ac544
%package libs
89ac544
Summary: Libsmbios shared libraries
89ac544
Group: System Environment/Libraries
573e129
Obsoletes: libsmbiosxml-libs < 0:%{version}-%{release}
573e129
Provides: libsmbiosxml-libs = %{version}-%{release}
89ac544
89ac544
89ac544
%package bin
89ac544
Summary: The "supported" sample binaries that use libsmbios
89ac544
Group: Applications/System
89ac544
Requires: libsmbios-libs = %{version}-%{release}
573e129
Obsoletes: libsmbiosxml-bin < 0:%{version}-%{release}
573e129
Provides: libsmbiosxml-bin = %{version}-%{release}
89ac544
89ac544
%package unsupported-bin
89ac544
Summary: Unsupported sample binaries using libsmbios
89ac544
Group: Applications/System
89ac544
Requires: libsmbios-libs = %{version}-%{release}
89ac544
89ac544
%package devel
89ac544
Summary: Development headers and archives
89ac544
Group: Development/Libraries
89ac544
Requires: libsmbios-libs = %{version}-%{release}
89ac544
89ac544
%description libs
89ac544
Libsmbios is a library and utilities that can be used by client programs 
89ac544
to get information from standard BIOS tables, such as the SMBIOS table.
89ac544
89ac544
%description devel
89ac544
Libsmbios is a library and utilities that can be used by client programs 
89ac544
to get information from standard BIOS tables, such as the SMBIOS table.
89ac544
89ac544
This package contains the headers and .a files necessary to compile new 
573e129
client programs against libsmbios.
89ac544
89ac544
%description bin
89ac544
Libsmbios is a library and utilities that can be used by client programs 
89ac544
to get information from standard BIOS tables, such as the SMBIOS table.
89ac544
89ac544
This package contains some sample binaries that use libsmbios.
89ac544
89ac544
%description unsupported-bin
89ac544
Libsmbios is a library and utilities that can be used by client programs 
89ac544
to get information from standard BIOS tables, such as the SMBIOS table.
89ac544
89ac544
This package contains some sample binaries that use libsmbios.
89ac544
89ac544
%prep
573e129
%setup -q 
89ac544
find . -type d -exec chmod -f 755 {} \;
573e129
find doc include libraries bin-unsupported build bin-supported cppunit -type f -exec chmod -f 644 {} \;
591950e
chmod 755 cppunit/*.sh
89ac544
89ac544
%build
591950e
export EXTRA_CXXFLAGS="%{optflags}" 
591950e
export EXTRA_CFLAGS="%{optflags}" 
591950e
export RELEASE_MAJOR=%{major} 
591950e
export RELEASE_MINOR=%{minor} 
591950e
export RELEASE_SUBLEVEL=%{sub} 
591950e
export RELEASE_EXTRALEVEL=%{extralevel}
d5edb4e
%configure
591950e
mkdir -p doc/full/html 
591950e
make -e %{?_smp_mflags} 
591950e
[ ! -d /usr/include/cppunit ] || make -e check
89ac544
89ac544
%install
89ac544
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
89ac544
89ac544
make install DESTDIR=%{buildroot}
89ac544
mkdir -p %{buildroot}/usr/include
89ac544
cp -a include/smbios %{buildroot}/usr/include/
89ac544
rm -f %{buildroot}/%{_libdir}/lib*.la
89ac544
89ac544
%clean
573e129
rm -rf %{buildroot}
89ac544
89ac544
%post libs -p /sbin/ldconfig
89ac544
%postun libs -p /sbin/ldconfig
89ac544
89ac544
%files libs
573e129
%defattr(-,root,root,-)
89ac544
%doc COPYING-GPL COPYING-OSL README
573e129
%{_libdir}/libsmbios.so.*
573e129
%{_libdir}/libsmbiosxml.so.*
89ac544
89ac544
%files devel
573e129
%defattr(-,root,root,-)
573e129
%doc COPYING-GPL COPYING-OSL README bin-unsupported/getopts_LICENSE.txt
89ac544
/usr/include/smbios
89ac544
%{_libdir}/libsmbios.a
89ac544
%{_libdir}/libsmbios.so
89ac544
%{_libdir}/libsmbiosxml.a
89ac544
%{_libdir}/libsmbiosxml.so
591950e
%doc doc/full/html
89ac544
89ac544
%files bin 
573e129
%defattr(-,root,root,-)
573e129
%doc COPYING-GPL COPYING-OSL README bin-unsupported/getopts_LICENSE.txt
89ac544
%{_bindir}/assetTag
89ac544
%{_bindir}/dellBiosUpdate
89ac544
%{_bindir}/getSystemId
89ac544
%{_bindir}/propertyTag
89ac544
%{_bindir}/serviceTag
89ac544
%{_bindir}/tokenCtl
89ac544
%{_bindir}/verifySmiPassword
89ac544
%{_bindir}/wakeupCtl
89ac544
%{_bindir}/dellLcdBrightness
e7a1713
%{_bindir}/dellWirelessCtl
89ac544
89ac544
%files unsupported-bin 
573e129
%defattr(-,root,root,-)
573e129
%doc COPYING-GPL COPYING-OSL README include/smbios/config/boost_LICENSE_1_0_txt bin-unsupported/getopts_LICENSE.txt
573e129
%{_bindir}/dellLEDCtl
89ac544
%{_bindir}/activateCmosToken
89ac544
%{_bindir}/ascii2enUS_scancode
89ac544
%{_bindir}/createUnitTestFiles
89ac544
%{_bindir}/disable_console_redir
89ac544
%{_bindir}/dumpCmos
89ac544
%{_bindir}/getPasswordFormat
89ac544
%{_bindir}/isCmosTokenActive
89ac544
%{_bindir}/probes
89ac544
%{_bindir}/smitest
89ac544
%{_bindir}/stateByteCtl
89ac544
%{_bindir}/upBootCtl
89ac544
%{_bindir}/dumpSmbios
89ac544
#%{_bindir}/sysid
89ac544
d5edb4e
# ./ChangeLog is appended by configure
89ac544
%changelog
d5edb4e
* Wed Aug 22 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.9
d5edb4e
- new upstream
d5edb4e
d5edb4e
* Tue Aug 6 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.8
d5edb4e
- new upstream
d5edb4e
591950e
* Tue Apr 3 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.6
d5edb4e
- critical bugfix for dellBiosUpdate utility for packet mode
591950e
- autoconf/automake support for automatically building docs
591950e
- more readable 'make' lines by splitting out env vars
591950e
- remove run_cppunit option... always run unit tests.
591950e
- update autoconf/automake utilities to latest version
591950e
- fix LDFLAGS to not overwrite user entered LDFLAGS
591950e
- add automatic doxygen build of docs
591950e
- fix urls of public repos
591950e
- remove yum repo page in favor of official page from docs
591950e
- split dmi table entry point from smbios table entry point
591950e
- support legacy _DMI_ tables
591950e
- fix support for EFI-based imacs without proper _SM_ anchor
591950e
573e129
* Tue Mar 20 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.5
573e129
- rpmlint cleanups
573e129
- Add dellLEDCtl binary
573e129
- update AUTHORS file to add credit for dellLEDCtl
573e129
- update doc/DellToken.txt to add a few more useful tokens.
573e129
- updated build system to create documentation
573e129
- skip cppunit dep on .elX builds (not in EPEL yet)
573e129
e7a1713
* Mon Mar 12 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.4-1
e7a1713
- Added dellWirelessCtl binary
e7a1713
- Added 'static' makefile target to build static binaries and clean them as well
e7a1713
- fix for signed/unsigned bug in probes binary. CPU temp misreported
e7a1713
- simplify interface for DELL_CALLING_INTERFACE_SMI, autodetect Port/Magic
e7a1713
- document all of the tokens for controlling wireless on dell notebooks
e7a1713
- enums for SMI args/res to make code match docs better (cbRES1 = res[0], which 
e7a1713
  was confusing.
e7a1713
- helper functions isTokenActive() and activateToken() to simplify token API.
e7a1713
- Added missing windows .cpp files to the dist tarball for those who compile 
e7a1713
  windows from dist tarball vs source control
e7a1713
- Add support for EFI based machines without backwards compatible smbios table
e7a1713
  entry point in 0xF0000 block.
e7a1713
- Added wirelessSwitchControl() and wirelessRadioControl() API for newer 
e7a1713
  laptops.
e7a1713
- fixed bug in TokenDA activate() code where it wasnt properly using SMI 
e7a1713
  (never worked, but apparently wasnt used until now.)
e7a1713
d5edb4e
* Tue Oct 3 2006 Michael E Brown <Michael_E_Brown@Dell.com> - 0.13.0-1
d5edb4e
- autotools conversion
d5edb4e
- add Changelog
d5edb4e
89ac544
* Tue Sep 26 2006 Michael E Brown <michael_e_brown at dell.com> - 0.12.4-1
89ac544
- Changes per Fedora Packaging Guidelines to prepare to submit to Extras.
89ac544
- Add in a changelog entry per Fedora Packaging Guidelines...
d5edb4e