Browse Source

libsmbios: update to 2.2.26

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@3684 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 14 years ago
parent
commit
5c2d81f52e
1 changed files with 265 additions and 109 deletions
  1. 265 109
      lib/libs/libsmbios/libsmbios-vl.spec

+ 265 - 109
lib/libs/libsmbios/libsmbios-vl.spec

@@ -1,161 +1,317 @@
+# pkg/libsmbios.spec.  Generated from libsmbios.spec.in by configure.
+# required by suse build system
+# norootforbuild
+
 # these are all substituted by autoconf
 %define major 2
-%define minor 0
-%define sub 1
-%define extralevel %{nil}
+%define minor 2
+%define micro 26
+%define extra %{nil}
+%define pot_file  libsmbios
+%define lang_dom  libsmbios-2.2-x86_64
+%define release_version 2.2.26
+
 %define release_name libsmbios
-%define release_version %{major}.%{minor}.%{sub}%{extralevel}
 
 Name: %{release_name}
 Version: %{release_version}
-Release: 3%{?_dist_release}
-License: GPLv2+ or OSL
+Release: 1%{?_dist_release}
+License: GPLv2+ or OSL 2.1
+Summary: Libsmbios C/C++ shared libraries
+Summary(ja): Libsmbios C/C++ shared libraries
 Group: System Environment/Libraries
-Source: http://linux.dell.com/libsmbios/download/%{name}/%{name}-%{version}/%{name}-%{version}.tar.gz
+Source: http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-%{version}/libsmbios-%{version}.tar.bz2
 URL: http://linux.dell.com/libsmbios/main
-Summary: Libsmbios shared libraries
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Provides: libsmbios-libs = %{version}-%{release}
-BuildRequires: libxml2-devel
+BuildRequires: strace libxml2-devel gcc-c++ gettext doxygen cppunit-devel pkgconfig python-devel
 
 # libsmbios only ever makes sense on intel compatible arches
 # no DMI tables on ppc, s390, etc.
 ExclusiveArch: x86_64 ia64 %{ix86}
 
-#EPEL4/5 dont have cppunit/cppunit-devel, so skip build tests
-# everything else should be able to pull in cppunit to run unit tests
-# during build. Doesnt affect binaries produced, so doesnt affect
-# build reproducability.
-%if %(test "%{dist}" != ".el4" -a "%{dist}" != ".el5" && echo 1 || echo 0)
-BuildRequires: cppunit-devel
-%endif
-
-# no doxygen native for suse
-%if %(test ! -e /etc/SuSE-release && echo 1 || echo 0)
-BuildRequires: doxygen
-%endif
+Vendor: Project Vine
+Distribution: Vine Linux
+Packager: shaolin, daisuke
 
 
 %description
-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.
+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 provides the C-based libsmbios library, with a C interface.
+
+This package also has a C++-based library, with a C++ interface. It is not
+actively maintained, but provided for backwards compatibility. New programs
+should use the libsmbios C interface.
+
+
+%package -n python-smbios
+Summary: Python interface to Libsmbios C library
+Summary(ja): Python interface to Libsmbios C library
+Group: System Environment/Libraries
+Requires: %{release_name} = %{version}-%{release}
+Requires: python
+
+%description -n python-smbios
+This package provides a Python interface to libsmbios
 
 %package -n smbios-utils
-Summary: The "supported" sample binaries that use libsmbios
+Summary: Meta-package that pulls in all smbios binaries and python scripts
+Summary(ja): Meta-package that pulls in all smbios binaries and python scripts
 Group: Applications/System
-Requires: libsmbios = %{version}-%{release}
-Obsoletes: libsmbios-bin < 0:2.0.0
-Provides: libsmbios-bin = %{version}-%{release}
-Obsoletes: libsmbios-unsupported-bin < 0:2.0.0
-Provides: libsmbios-unsupported-bin = %{version}-%{release}
-Obsoletes: libsmbios-libs < 0:2.0.0
-Provides: libsmbios-libs = %{version}-%{release}
-
-%package devel
-Summary: Development headers and archives
-Group: Development/Libraries
-Requires: libsmbios = %{version}-%{release}
+Requires: smbios-utils-bin
+Requires: smbios-utils-python
 
-%description 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.
+%description -n smbios-utils
+This is a meta-package that pulls in the binary libsmbios executables as well
+as the python executables.
 
-This package contains the headers and .a files necessary to compile new 
-client programs against libsmbios.
+%package -n smbios-utils-bin
+Summary: Binary utilities that use libsmbios
+Summary(ja): Binary ユーティリティ that use libsmbios
+Group: Applications/System
+Requires: %{release_name} = %{version}-%{release}
 
-%description -n smbios-utils
-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.
+%description -n smbios-utils-bin
+Get BIOS information, such as System product name, product id, service tag and
+asset tag.
 
-This package contains some sample binaries that use libsmbios.
+%package -n smbios-utils-python
+Summary: Python executables that use libsmbios
+Summary(ja): Python executables that use libsmbios
+Group: Applications/System
+Requires: python-smbios = %{version}-%{release}
+
+%description -n smbios-utils-python
+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.
+
+# name the devel package libsmbios-devel regardless of package name, per suse/fedora convention
+%package -n libsmbios-devel
+Summary: Development headers and archives
+Summary(ja): Development headers and archives
+Group: Development/Libraries
+Requires: %{release_name} = %{version}-%{release}
+
+%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.
 
 %prep
-%setup -q 
+
+%setup -q -n libsmbios-%{version}
 find . -type d -exec chmod -f 755 {} \;
-find doc include libraries bin-unsupported build bin-supported cppunit -type f -exec chmod -f 644 {} \;
-chmod 755 cppunit/*.sh
+find doc src -type f -exec chmod -f 644 {} \;
+chmod 755 src/cppunit/*.sh
 
 %build
-export EXTRA_CXXFLAGS="%{optflags}" 
-export EXTRA_CFLAGS="%{optflags}" 
-export RELEASE_MAJOR=%{major} 
-export RELEASE_MINOR=%{minor} 
-export RELEASE_SUBLEVEL=%{sub} 
-export RELEASE_EXTRALEVEL=%{extralevel}
+# this line lets us build an RPM directly from a git tarball
+# and retains any customized version information we might have
+[ -e ./configure ] || ./autogen.sh --no-configure
+
+mkdir _build
+cd _build
+echo '../configure "$@"' > configure
+chmod +x ./configure
+
 %configure
-mkdir -p doc/full/html 
-make -e %{?_smp_mflags} 
-[ ! -d /usr/include/cppunit ] || make -e check
+
+mkdir -p out/libsmbios_c
+mkdir -p out/libsmbios_c++
+make %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log
+
+echo \%doc _build/build-%{_arch}.log > buildlogs.txt
 
 %install
 rm -rf %{buildroot}
+mkdir %{buildroot}
 
+cd _build
+TOPDIR=..
 make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
-mkdir -p %{buildroot}/usr/include
-cp -a include/smbios %{buildroot}/usr/include/
-rm -f %{buildroot}/%{_libdir}/lib*.la
-find %{buildroot}/usr/include -exec touch -r configure.ac {} \;
-find doc/full -exec touch -r configure.ac {} \;
+mkdir -p %{buildroot}/%{_includedir}
+cp -a $TOPDIR/src/include/*  %{buildroot}/%{_includedir}/
+cp -a out/public-include/*  %{buildroot}/%{_includedir}/
+rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
+find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \;
+
+mv out/libsmbios_c++  out/libsmbios_c++-%{_arch}
+mv out/libsmbios_c    out/libsmbios_c-%{_arch}
+
+rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
+%find_lang %{lang_dom}
+
+touch files-yum-dellsysid
+touch files-smbios-utils-python
+touch files-python-smbios
 
 # backwards compatible:
-ln -s /usr/sbin/dellWirelessCtl %{buildroot}/usr/bin/dellWirelessCtl
+ln -s %{_sbindir}/dellWirelessCtl %{buildroot}/%{_bindir}/dellWirelessCtl
+ln -s smbios-sys-info %{buildroot}/%{_sbindir}/getSystemId
+ln -s smbios-wireless-ctl %{buildroot}/%{_sbindir}/dellWirelessCtl
+ln -s smbios-lcd-brightness %{buildroot}/%{_sbindir}/dellLcdBrightness
+ln -s smbios-rbu-bios-update %{buildroot}/%{_sbindir}/dellBiosUpdate
+
+cat > files-python-smbios <<-EOF
+	%doc COPYING-GPL COPYING-OSL README
+	%{python_sitelib}/*
+EOF
+
+cat > files-smbios-utils-python <<-EOF
+	%doc COPYING-GPL COPYING-OSL README
+	%doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
+	%doc doc/pkgheader.sh
+	%dir %{_sysconfdir}/libsmbios
+	%config(noreplace) %{_sysconfdir}/libsmbios/*
+	
+	# python utilities
+	%{_sbindir}/smbios-sys-info
+	%{_sbindir}/smbios-token-ctl
+	%{_sbindir}/smbios-passwd
+	%{_sbindir}/smbios-wakeup-ctl
+	%{_sbindir}/smbios-wireless-ctl
+	%{_sbindir}/smbios-rbu-bios-update
+	%{_sbindir}/smbios-lcd-brightness
+	
+	# symlinks: backwards compat
+	%{_sbindir}/dellLcdBrightness
+	%{_sbindir}/getSystemId
+	%{_sbindir}/dellWirelessCtl
+	%{_sbindir}/dellBiosUpdate
+	# used by HAL in old location, so keep it around until HAL is updated.
+	%{_bindir}/dellWirelessCtl
+	
+	# data files
+	%{_datadir}/smbios-utils
+EOF
 
 %clean
 rm -rf %{buildroot}
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post   -n %{release_name}   -p /sbin/ldconfig
+%postun -n %{release_name}   -p /sbin/ldconfig
 
-%files
+%files -f _build/%{lang_dom}.lang
 %defattr(-,root,root,-)
-%doc COPYING-GPL COPYING-OSL README
+%{_libdir}/libsmbios_c.so.*
 %{_libdir}/libsmbios.so.*
 
-%files devel
+%files -n libsmbios-devel -f _build/buildlogs.txt
 %defattr(-,root,root,-)
-%doc COPYING-GPL COPYING-OSL README bin-unsupported/getopts_LICENSE.txt
-/usr/include/smbios
-%{_libdir}/libsmbios.a
+%doc COPYING-GPL COPYING-OSL README src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
+%{_includedir}/smbios
+%{_includedir}/smbios_c
 %{_libdir}/libsmbios.so
-%doc doc/full/html
+%{_libdir}/libsmbios_c.so
+%{_libdir}/pkgconfig/*.pc
+%doc _build/out/libsmbios_c++-%{_arch}
+%doc _build/out/libsmbios_c-%{_arch}
 
 %files -n smbios-utils
+# opensuse 11.1 enforces non-empty file list :(
 %defattr(-,root,root,-)
 %doc COPYING-GPL COPYING-OSL README
-%doc bin-unsupported/getopts_LICENSE.txt include/smbios/config/boost_LICENSE_1_0_txt
-%{_sbindir}/assetTag
-%{_sbindir}/dellBiosUpdate
-%{_sbindir}/getSystemId
-%{_sbindir}/propertyTag
-%{_sbindir}/serviceTag
-%{_sbindir}/verifySmiPassword
-%{_sbindir}/wakeupCtl
-%{_sbindir}/dellLcdBrightness
-
-# used by HAL in old location, so keep it around until HAL is updated.
-%{_sbindir}/dellWirelessCtl
-%{_bindir}/dellWirelessCtl
-
-# community supported stuff...
-# may or may not work
+# no other files.
+
+%files -n smbios-utils-bin
+%defattr(-,root,root,-)
+%doc COPYING-GPL COPYING-OSL README
+%doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
+%doc doc/pkgheader.sh
+#
+# legacy C++
+%{_sbindir}/dellBiosUpdate-compat
 %{_sbindir}/dellLEDCtl
-%{_sbindir}/activateCmosToken
-%{_sbindir}/ascii2enUS_scancode
-%{_sbindir}/createUnitTestFiles
-%{_sbindir}/disable_console_redir
-%{_sbindir}/dumpCmos
-%{_sbindir}/getPasswordFormat
-%{_sbindir}/isCmosTokenActive
-%{_sbindir}/probes
-%{_sbindir}/smitest
-%{_sbindir}/stateByteCtl
-%{_sbindir}/upBootCtl
-%{_sbindir}/dumpSmbios
-
-# ./ChangeLog is appended by configure
+%ifnarch ia64
+%{_sbindir}/dellMediaDirectCtl
+%endif
+#
+# new C utilities
+%{_sbindir}/smbios-state-byte-ctl
+%{_sbindir}/smbios-get-ut-data
+%{_sbindir}/smbios-upflag-ctl
+%{_sbindir}/smbios-sys-info-lite
+
+%files -n python-smbios -f _build/files-python-smbios
+%defattr(-,root,root,-)
+
+%files -n smbios-utils-python -f _build/files-smbios-utils-python
+%defattr(-,root,root,-)
+
+
 %changelog
-* Sat May 24 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.1-3
-- initial build for Vine Linux
+* Sun Apr 24 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.26-1
+- merged with upstream package
+  * Sat May 24 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.1-3
+  - initial build for Vine Linux
+
+* Mon Sep 27 2010 Matt Domsch <mdomsch@fedoraproject.org> - 2.2.26-3
+- build for Fedora 15
+
+* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.2.19-2
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Fri Jul 06 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.26-1
+- implement CSV export of token settings from smbios-token-ctl
+
+* Fri Jul 06 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.25-1
+- Fix breakage resulting from improperly fixing up constructors for MemoryAccess/CmosAccess. Fixes CLI utilities.
+
+* Fri Jun 11 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.23-1
+- Fixup ABI break where a couple functions that should have been exported were not marked.
+
+* Thu Jun 10 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.22-1
+- Fixup bug in reading asset and service tag where it A) read checksum from wrong location and B) used wrong comparison check to validate it
+- enable service tag SET for machines that still set service tag in CMOS
+- ABI/API - change to -fvisibility=hidden for libsmbios_c.so.*, mark public api's. This removes all non-public symbols that were not formerly part of the ABI from the dynamic link table.
+
+* Mon May 18 2009 Matt Domsch <Matt_Domsch@dell.com> - 2.2.16-3
+- split yum plugin into yum-dellsysid package
+
+* Mon Mar 24 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.16-1
+- add gcc 4.4 support
+
+* Mon Mar 24 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.15-1
+- update to lastest upstream.
+- fixes bug in bios update on systems with versions like x.y.z.
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.13-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Tue Feb 3 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.12-1
+- Add feature to turn on debugging printf()'s without recompiling by setting
+  certain environment variables:
+    LIBSMBIOS_C_DEBUG_OUTPUT_ALL    -- all debugging output
+        or, per module:
+    LIBSMBIOS_C_DEBUG_CONSTRUCTOR_C
+    LIBSMBIOS_C_DEBUG_SYSINFO_C
+    LIBSMBIOS_C_DEBUG_SMBIOS_C
+    LIBSMBIOS_C_DEBUG_TOKEN_C
+    LIBSMBIOS_C_DEBUG_MEMORY_C
+    LIBSMBIOS_C_DEBUG_CMOS_C
+    LIBSMBIOS_C_DEBUG_SMI_C
+
+* Mon Feb 2 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.12-1
+- Add pkgconfig files to -devel
+- fixup yum plugin to not parse certain data that causes a crash on some machines (Optiplex 755, others may be affected)
+
+* Thu Jan 15 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.8-1
+- revert change in upstream renaming rpm to libsmbios2
+
+* Thu Jan 15 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.7-1
+- change source to bz2 format
+- Update to latest upstream release. Many changes in the new release:
+  - python interface
+  - libsmbios_c interface almost fully implemented
+  - libsmbios c++ interface deprecated
+
+* Tue Oct 28 2008 Michael E Brown <michael_e_brown at dell.com> - 2.2.0-1
+- Spec updates
 
 * Mon Apr 21 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1-2.1
 - obsolete libsmbios-libs as well
@@ -212,16 +368,16 @@ rm -rf %{buildroot}
 - fix for signed/unsigned bug in probes binary. CPU temp misreported
 - simplify interface for DELL_CALLING_INTERFACE_SMI, autodetect Port/Magic
 - document all of the tokens for controlling wireless on dell notebooks
-- enums for SMI args/res to make code match docs better (cbRES1 = res[0], which 
+- enums for SMI args/res to make code match docs better (cbRES1 = res[0], which
   was confusing.
 - helper functions isTokenActive() and activateToken() to simplify token API.
-- Added missing windows .cpp files to the dist tarball for those who compile 
+- Added missing windows .cpp files to the dist tarball for those who compile
   windows from dist tarball vs source control
 - Add support for EFI based machines without backwards compatible smbios table
   entry point in 0xF0000 block.
-- Added wirelessSwitchControl() and wirelessRadioControl() API for newer 
+- Added wirelessSwitchControl() and wirelessRadioControl() API for newer
   laptops.
-- fixed bug in TokenDA activate() code where it wasnt properly using SMI 
+- fixed bug in TokenDA activate() code where it wasnt properly using SMI
   (never worked, but apparently wasnt used until now.)
 
 * Tue Oct 3 2006 Michael E Brown <Michael_E_Brown@Dell.com> - 0.13.0-1