libsmbios-vl.spec 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. # these are all substituted by autoconf
  2. %define major 2
  3. %define minor 0
  4. %define sub 1
  5. %define extralevel %{nil}
  6. %define release_name libsmbios
  7. %define release_version %{major}.%{minor}.%{sub}%{extralevel}
  8. Name: %{release_name}
  9. Version: %{release_version}
  10. Release: 3%{?_dist_release}
  11. License: GPLv2+ or OSL
  12. Group: System Environment/Libraries
  13. Source: http://linux.dell.com/libsmbios/download/%{name}/%{name}-%{version}/%{name}-%{version}.tar.gz
  14. URL: http://linux.dell.com/libsmbios/main
  15. Summary: Libsmbios shared libraries
  16. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  17. Provides: libsmbios-libs = %{version}-%{release}
  18. BuildRequires: libxml2-devel
  19. # libsmbios only ever makes sense on intel compatible arches
  20. # no DMI tables on ppc, s390, etc.
  21. ExclusiveArch: x86_64 ia64 %{ix86}
  22. #EPEL4/5 dont have cppunit/cppunit-devel, so skip build tests
  23. # everything else should be able to pull in cppunit to run unit tests
  24. # during build. Doesnt affect binaries produced, so doesnt affect
  25. # build reproducability.
  26. %if %(test "%{dist}" != ".el4" -a "%{dist}" != ".el5" && echo 1 || echo 0)
  27. BuildRequires: cppunit-devel
  28. %endif
  29. # no doxygen native for suse
  30. %if %(test ! -e /etc/SuSE-release && echo 1 || echo 0)
  31. BuildRequires: doxygen
  32. %endif
  33. %description
  34. Libsmbios is a library and utilities that can be used by client programs
  35. to get information from standard BIOS tables, such as the SMBIOS table.
  36. %package -n smbios-utils
  37. Summary: The "supported" sample binaries that use libsmbios
  38. Group: Applications/System
  39. Requires: libsmbios = %{version}-%{release}
  40. Obsoletes: libsmbios-bin < 0:2.0.0
  41. Provides: libsmbios-bin = %{version}-%{release}
  42. Obsoletes: libsmbios-unsupported-bin < 0:2.0.0
  43. Provides: libsmbios-unsupported-bin = %{version}-%{release}
  44. Obsoletes: libsmbios-libs < 0:2.0.0
  45. Provides: libsmbios-libs = %{version}-%{release}
  46. %package devel
  47. Summary: Development headers and archives
  48. Group: Development/Libraries
  49. Requires: libsmbios = %{version}-%{release}
  50. %description devel
  51. Libsmbios is a library and utilities that can be used by client programs
  52. to get information from standard BIOS tables, such as the SMBIOS table.
  53. This package contains the headers and .a files necessary to compile new
  54. client programs against libsmbios.
  55. %description -n smbios-utils
  56. Libsmbios is a library and utilities that can be used by client programs
  57. to get information from standard BIOS tables, such as the SMBIOS table.
  58. This package contains some sample binaries that use libsmbios.
  59. %prep
  60. %setup -q
  61. find . -type d -exec chmod -f 755 {} \;
  62. find doc include libraries bin-unsupported build bin-supported cppunit -type f -exec chmod -f 644 {} \;
  63. chmod 755 cppunit/*.sh
  64. %build
  65. export EXTRA_CXXFLAGS="%{optflags}"
  66. export EXTRA_CFLAGS="%{optflags}"
  67. export RELEASE_MAJOR=%{major}
  68. export RELEASE_MINOR=%{minor}
  69. export RELEASE_SUBLEVEL=%{sub}
  70. export RELEASE_EXTRALEVEL=%{extralevel}
  71. %configure
  72. mkdir -p doc/full/html
  73. make -e %{?_smp_mflags}
  74. [ ! -d /usr/include/cppunit ] || make -e check
  75. %install
  76. rm -rf %{buildroot}
  77. make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
  78. mkdir -p %{buildroot}/usr/include
  79. cp -a include/smbios %{buildroot}/usr/include/
  80. rm -f %{buildroot}/%{_libdir}/lib*.la
  81. find %{buildroot}/usr/include -exec touch -r configure.ac {} \;
  82. find doc/full -exec touch -r configure.ac {} \;
  83. # backwards compatible:
  84. ln -s /usr/sbin/dellWirelessCtl %{buildroot}/usr/bin/dellWirelessCtl
  85. %clean
  86. rm -rf %{buildroot}
  87. %post -p /sbin/ldconfig
  88. %postun -p /sbin/ldconfig
  89. %files
  90. %defattr(-,root,root,-)
  91. %doc COPYING-GPL COPYING-OSL README
  92. %{_libdir}/libsmbios.so.*
  93. %files devel
  94. %defattr(-,root,root,-)
  95. %doc COPYING-GPL COPYING-OSL README bin-unsupported/getopts_LICENSE.txt
  96. /usr/include/smbios
  97. %{_libdir}/libsmbios.a
  98. %{_libdir}/libsmbios.so
  99. %doc doc/full/html
  100. %files -n smbios-utils
  101. %defattr(-,root,root,-)
  102. %doc COPYING-GPL COPYING-OSL README
  103. %doc bin-unsupported/getopts_LICENSE.txt include/smbios/config/boost_LICENSE_1_0_txt
  104. %{_sbindir}/assetTag
  105. %{_sbindir}/dellBiosUpdate
  106. %{_sbindir}/getSystemId
  107. %{_sbindir}/propertyTag
  108. %{_sbindir}/serviceTag
  109. %{_sbindir}/verifySmiPassword
  110. %{_sbindir}/wakeupCtl
  111. %{_sbindir}/dellLcdBrightness
  112. # used by HAL in old location, so keep it around until HAL is updated.
  113. %{_sbindir}/dellWirelessCtl
  114. %{_bindir}/dellWirelessCtl
  115. # community supported stuff...
  116. # may or may not work
  117. %{_sbindir}/dellLEDCtl
  118. %{_sbindir}/activateCmosToken
  119. %{_sbindir}/ascii2enUS_scancode
  120. %{_sbindir}/createUnitTestFiles
  121. %{_sbindir}/disable_console_redir
  122. %{_sbindir}/dumpCmos
  123. %{_sbindir}/getPasswordFormat
  124. %{_sbindir}/isCmosTokenActive
  125. %{_sbindir}/probes
  126. %{_sbindir}/smitest
  127. %{_sbindir}/stateByteCtl
  128. %{_sbindir}/upBootCtl
  129. %{_sbindir}/dumpSmbios
  130. # ./ChangeLog is appended by configure
  131. %changelog
  132. * Sat May 24 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.1-3
  133. - initial build for Vine Linux
  134. * Mon Apr 21 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1-2.1
  135. - obsolete libsmbios-libs as well
  136. * Mon Mar 3 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1-2
  137. - properly obsolete older versions
  138. * Wed Feb 13 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1
  139. - Fixup GCC 4.3 compile issues.
  140. * Wed Jan 9 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.0
  141. - ABI incompatible, minor API changes
  142. - sync up libsmbios soname with version #
  143. - move binaries to /usr/sbin as they are only runnable by root
  144. - drop libsmbiosxml lib as it was mostly unused.
  145. - drop autotools generated files out of git and add autogen.sh
  146. - drop tokenCtl binary-- pysmbios has a *much* improved version
  147. * Wed Aug 22 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.9
  148. - Fix a couple of failure-to-check-return on fopen. most were unit-test code
  149. only, but two or three were in regular code.
  150. - Add hinting to the memory class, so that it can intelligently close /dev/mem
  151. file handle when it is not needed (which is most of the time). it only
  152. leaves it open when it is scanning, so speed is not impacted.
  153. * Tue Aug 6 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.8
  154. - new upstream
  155. * Tue Apr 3 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.6
  156. - critical bugfix for dellBiosUpdate utility for packet mode
  157. - autoconf/automake support for automatically building docs
  158. - more readable 'make' lines by splitting out env vars
  159. - remove run_cppunit option... always run unit tests.
  160. - update autoconf/automake utilities to latest version
  161. - fix LDFLAGS to not overwrite user entered LDFLAGS
  162. - add automatic doxygen build of docs
  163. - fix urls of public repos
  164. - remove yum repo page in favor of official page from docs
  165. - split dmi table entry point from smbios table entry point
  166. - support legacy _DMI_ tables
  167. - fix support for EFI-based imacs without proper _SM_ anchor
  168. * Tue Mar 20 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.5
  169. - rpmlint cleanups
  170. - Add dellLEDCtl binary
  171. - update AUTHORS file to add credit for dellLEDCtl
  172. - update doc/DellToken.txt to add a few more useful tokens.
  173. - updated build system to create documentation
  174. - skip cppunit dep on .elX builds (not in EPEL yet)
  175. * Mon Mar 12 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.4-1
  176. - Added dellWirelessCtl binary
  177. - Added 'static' makefile target to build static binaries and clean them as well
  178. - fix for signed/unsigned bug in probes binary. CPU temp misreported
  179. - simplify interface for DELL_CALLING_INTERFACE_SMI, autodetect Port/Magic
  180. - document all of the tokens for controlling wireless on dell notebooks
  181. - enums for SMI args/res to make code match docs better (cbRES1 = res[0], which
  182. was confusing.
  183. - helper functions isTokenActive() and activateToken() to simplify token API.
  184. - Added missing windows .cpp files to the dist tarball for those who compile
  185. windows from dist tarball vs source control
  186. - Add support for EFI based machines without backwards compatible smbios table
  187. entry point in 0xF0000 block.
  188. - Added wirelessSwitchControl() and wirelessRadioControl() API for newer
  189. laptops.
  190. - fixed bug in TokenDA activate() code where it wasnt properly using SMI
  191. (never worked, but apparently wasnt used until now.)
  192. * Tue Oct 3 2006 Michael E Brown <Michael_E_Brown@Dell.com> - 0.13.0-1
  193. - autotools conversion
  194. - add Changelog
  195. * Tue Sep 26 2006 Michael E Brown <michael_e_brown at dell.com> - 0.12.4-1
  196. - Changes per Fedora Packaging Guidelines to prepare to submit to Extras.
  197. - Add in a changelog entry per Fedora Packaging Guidelines...