libsmbios-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. # pkg/libsmbios.spec. Generated from libsmbios.spec.in by configure.
  2. # required by suse build system
  3. # norootforbuild
  4. # these are all substituted by autoconf
  5. %define major 2
  6. %define minor 2
  7. %define micro 28
  8. %define extra %{nil}
  9. %define pot_file libsmbios
  10. %define lang_dom libsmbios-2.2-x86_64
  11. %define release_version 2.2.28
  12. %define release_name libsmbios
  13. Name: %{release_name}
  14. Version: %{release_version}
  15. Release: 1%{?_dist_release}
  16. License: GPLv2+ or OSL 2.1
  17. Summary: Libsmbios C/C++ shared libraries
  18. Summary(ja): Libsmbios C/C++ shared libraries
  19. Group: System Environment/Libraries
  20. Source: http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-%{version}/libsmbios-%{version}.tar.bz2
  21. URL: http://linux.dell.com/libsmbios/main
  22. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  23. BuildRequires: strace libxml2-devel gcc-c++ gettext doxygen cppunit-devel pkgconfig python-devel
  24. # libsmbios only ever makes sense on intel compatible arches
  25. # no DMI tables on ppc, s390, etc.
  26. ExclusiveArch: x86_64 ia64 %{ix86}
  27. Vendor: Project Vine
  28. Distribution: Vine Linux
  29. Packager: shaolin, daisuke
  30. %description
  31. Libsmbios is a library and utilities that can be used by client programs to get
  32. information from standard BIOS tables, such as the SMBIOS table.
  33. This package provides the C-based libsmbios library, with a C interface.
  34. This package also has a C++-based library, with a C++ interface. It is not
  35. actively maintained, but provided for backwards compatibility. New programs
  36. should use the libsmbios C interface.
  37. %package -n python-smbios
  38. Summary: Python interface to Libsmbios C library
  39. Summary(ja): Python interface to Libsmbios C library
  40. Group: System Environment/Libraries
  41. Requires: %{release_name} = %{version}-%{release}
  42. Requires: python
  43. %description -n python-smbios
  44. This package provides a Python interface to libsmbios
  45. %package -n smbios-utils
  46. Summary: Meta-package that pulls in all smbios binaries and python scripts
  47. Summary(ja): Meta-package that pulls in all smbios binaries and python scripts
  48. Group: Applications/System
  49. Requires: smbios-utils-bin
  50. Requires: smbios-utils-python
  51. %description -n smbios-utils
  52. This is a meta-package that pulls in the binary libsmbios executables as well
  53. as the python executables.
  54. %package -n smbios-utils-bin
  55. Summary: Binary utilities that use libsmbios
  56. Summary(ja): Binary ユーティリティ that use libsmbios
  57. Group: Applications/System
  58. Requires: %{release_name} = %{version}-%{release}
  59. %description -n smbios-utils-bin
  60. Get BIOS information, such as System product name, product id, service tag and
  61. asset tag.
  62. %package -n smbios-utils-python
  63. Summary: Python executables that use libsmbios
  64. Summary(ja): Python executables that use libsmbios
  65. Group: Applications/System
  66. Requires: python-smbios = %{version}-%{release}
  67. %description -n smbios-utils-python
  68. Get BIOS information, such as System product name, product id, service tag and
  69. asset tag. Set service and asset tags on Dell machines. Manipulate wireless
  70. cards/bluetooth on Dell laptops. Set BIOS password on select Dell systems.
  71. Update BIOS on select Dell systems. Set LCD brightness on select Dell laptops.
  72. # name the devel package libsmbios-devel regardless of package name, per suse/fedora convention
  73. %package -n libsmbios-devel
  74. Summary: Development headers and archives
  75. Summary(ja): Development headers and archives
  76. Group: Development/Libraries
  77. Requires: %{release_name} = %{version}-%{release}
  78. %description -n libsmbios-devel
  79. Libsmbios is a library and utilities that can be used by client programs to get
  80. information from standard BIOS tables, such as the SMBIOS table.
  81. This package contains the headers and .a files necessary to compile new client
  82. programs against libsmbios.
  83. %prep
  84. %setup -q -n libsmbios-%{version}
  85. find . -type d -exec chmod -f 755 {} \;
  86. find doc src -type f -exec chmod -f 644 {} \;
  87. chmod 755 src/cppunit/*.sh
  88. %build
  89. # this line lets us build an RPM directly from a git tarball
  90. # and retains any customized version information we might have
  91. [ -e ./configure ] || ./autogen.sh --no-configure
  92. mkdir _build
  93. cd _build
  94. echo '../configure "$@"' > configure
  95. chmod +x ./configure
  96. %configure
  97. mkdir -p out/libsmbios_c
  98. mkdir -p out/libsmbios_c++
  99. make %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log
  100. echo \%doc _build/build-%{_arch}.log > buildlogs.txt
  101. %install
  102. rm -rf %{buildroot}
  103. mkdir %{buildroot}
  104. cd _build
  105. TOPDIR=..
  106. make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
  107. mkdir -p %{buildroot}/%{_includedir}
  108. cp -a $TOPDIR/src/include/* %{buildroot}/%{_includedir}/
  109. cp -a out/public-include/* %{buildroot}/%{_includedir}/
  110. rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
  111. find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \;
  112. mv out/libsmbios_c++ out/libsmbios_c++-%{_arch}
  113. mv out/libsmbios_c out/libsmbios_c-%{_arch}
  114. rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
  115. %find_lang %{lang_dom}
  116. touch files-yum-dellsysid
  117. touch files-smbios-utils-python
  118. touch files-python-smbios
  119. # backwards compatible:
  120. ln -s %{_sbindir}/dellWirelessCtl %{buildroot}/%{_bindir}/dellWirelessCtl
  121. ln -s smbios-sys-info %{buildroot}/%{_sbindir}/getSystemId
  122. ln -s smbios-wireless-ctl %{buildroot}/%{_sbindir}/dellWirelessCtl
  123. ln -s smbios-lcd-brightness %{buildroot}/%{_sbindir}/dellLcdBrightness
  124. ln -s smbios-rbu-bios-update %{buildroot}/%{_sbindir}/dellBiosUpdate
  125. cat > files-python-smbios <<-EOF
  126. %doc COPYING-GPL COPYING-OSL README
  127. %{python_sitelib}/*
  128. EOF
  129. cat > files-smbios-utils-python <<-EOF
  130. %doc COPYING-GPL COPYING-OSL README
  131. %doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
  132. %doc doc/pkgheader.sh
  133. %dir %{_sysconfdir}/libsmbios
  134. %config(noreplace) %{_sysconfdir}/libsmbios/*
  135. # python utilities
  136. %{_sbindir}/smbios-sys-info
  137. %{_sbindir}/smbios-token-ctl
  138. %{_sbindir}/smbios-passwd
  139. %{_sbindir}/smbios-wakeup-ctl
  140. %{_sbindir}/smbios-wireless-ctl
  141. %{_sbindir}/smbios-rbu-bios-update
  142. %{_sbindir}/smbios-lcd-brightness
  143. # symlinks: backwards compat
  144. %{_sbindir}/dellLcdBrightness
  145. %{_sbindir}/getSystemId
  146. %{_sbindir}/dellWirelessCtl
  147. %{_sbindir}/dellBiosUpdate
  148. # used by HAL in old location, so keep it around until HAL is updated.
  149. %{_bindir}/dellWirelessCtl
  150. # data files
  151. %{_datadir}/smbios-utils
  152. EOF
  153. %clean
  154. rm -rf %{buildroot}
  155. %post -n %{release_name} -p /sbin/ldconfig
  156. %postun -n %{release_name} -p /sbin/ldconfig
  157. %files -f _build/%{lang_dom}.lang
  158. %defattr(-,root,root,-)
  159. %{_libdir}/libsmbios_c.so.*
  160. %{_libdir}/libsmbios.so.*
  161. %files -n libsmbios-devel -f _build/buildlogs.txt
  162. %defattr(-,root,root,-)
  163. %doc COPYING-GPL COPYING-OSL README src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
  164. %{_includedir}/smbios
  165. %{_includedir}/smbios_c
  166. %{_libdir}/libsmbios.so
  167. %{_libdir}/libsmbios_c.so
  168. %{_libdir}/pkgconfig/*.pc
  169. %doc _build/out/libsmbios_c++-%{_arch}
  170. %doc _build/out/libsmbios_c-%{_arch}
  171. %files -n smbios-utils
  172. # opensuse 11.1 enforces non-empty file list :(
  173. %defattr(-,root,root,-)
  174. %doc COPYING-GPL COPYING-OSL README
  175. # no other files.
  176. %files -n smbios-utils-bin
  177. %defattr(-,root,root,-)
  178. %doc COPYING-GPL COPYING-OSL README
  179. %doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
  180. %doc doc/pkgheader.sh
  181. #
  182. # legacy C++
  183. %{_sbindir}/dellBiosUpdate-compat
  184. %{_sbindir}/dellLEDCtl
  185. %ifnarch ia64
  186. %{_sbindir}/dellMediaDirectCtl
  187. %endif
  188. #
  189. # new C utilities
  190. %{_sbindir}/smbios-state-byte-ctl
  191. %{_sbindir}/smbios-get-ut-data
  192. %{_sbindir}/smbios-upflag-ctl
  193. %{_sbindir}/smbios-sys-info-lite
  194. %files -n python-smbios -f _build/files-python-smbios
  195. %defattr(-,root,root,-)
  196. %files -n smbios-utils-python -f _build/files-smbios-utils-python
  197. %defattr(-,root,root,-)
  198. %changelog
  199. * Thu Feb 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.28-1
  200. - update to 2.2.28
  201. * Sun Apr 24 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.26-1
  202. - merged with upstream package
  203. * Sat May 24 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.1-3
  204. - initial build for Vine Linux
  205. * Mon Sep 27 2010 Matt Domsch <mdomsch@fedoraproject.org> - 2.2.26-3
  206. - build for Fedora 15
  207. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.2.19-2
  208. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  209. * Fri Jul 06 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.26-1
  210. - implement CSV export of token settings from smbios-token-ctl
  211. * Fri Jul 06 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.25-1
  212. - Fix breakage resulting from improperly fixing up constructors for MemoryAccess/CmosAccess. Fixes CLI utilities.
  213. * Fri Jun 11 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.23-1
  214. - Fixup ABI break where a couple functions that should have been exported were not marked.
  215. * Thu Jun 10 2010 Michael Brown <michael-e_brown at dell.com> - 2.2.22-1
  216. - 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
  217. - enable service tag SET for machines that still set service tag in CMOS
  218. - 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.
  219. * Mon May 18 2009 Matt Domsch <Matt_Domsch@dell.com> - 2.2.16-3
  220. - split yum plugin into yum-dellsysid package
  221. * Mon Mar 24 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.16-1
  222. - add gcc 4.4 support
  223. * Mon Mar 24 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.15-1
  224. - update to lastest upstream.
  225. - fixes bug in bios update on systems with versions like x.y.z.
  226. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.13-2
  227. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  228. * Tue Feb 3 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.12-1
  229. - Add feature to turn on debugging printf()'s without recompiling by setting
  230. certain environment variables:
  231. LIBSMBIOS_C_DEBUG_OUTPUT_ALL -- all debugging output
  232. or, per module:
  233. LIBSMBIOS_C_DEBUG_CONSTRUCTOR_C
  234. LIBSMBIOS_C_DEBUG_SYSINFO_C
  235. LIBSMBIOS_C_DEBUG_SMBIOS_C
  236. LIBSMBIOS_C_DEBUG_TOKEN_C
  237. LIBSMBIOS_C_DEBUG_MEMORY_C
  238. LIBSMBIOS_C_DEBUG_CMOS_C
  239. LIBSMBIOS_C_DEBUG_SMI_C
  240. * Mon Feb 2 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.12-1
  241. - Add pkgconfig files to -devel
  242. - fixup yum plugin to not parse certain data that causes a crash on some machines (Optiplex 755, others may be affected)
  243. * Thu Jan 15 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.8-1
  244. - revert change in upstream renaming rpm to libsmbios2
  245. * Thu Jan 15 2009 Michael E Brown <michael_e_brown at dell.com> - 2.2.7-1
  246. - change source to bz2 format
  247. - Update to latest upstream release. Many changes in the new release:
  248. - python interface
  249. - libsmbios_c interface almost fully implemented
  250. - libsmbios c++ interface deprecated
  251. * Tue Oct 28 2008 Michael E Brown <michael_e_brown at dell.com> - 2.2.0-1
  252. - Spec updates
  253. * Mon Apr 21 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1-2.1
  254. - obsolete libsmbios-libs as well
  255. * Mon Mar 3 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1-2
  256. - properly obsolete older versions
  257. * Wed Feb 13 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.1
  258. - Fixup GCC 4.3 compile issues.
  259. * Wed Jan 9 2008 Michael E Brown <michael_e_brown at dell.com> - 2.0.0
  260. - ABI incompatible, minor API changes
  261. - sync up libsmbios soname with version #
  262. - move binaries to /usr/sbin as they are only runnable by root
  263. - drop libsmbiosxml lib as it was mostly unused.
  264. - drop autotools generated files out of git and add autogen.sh
  265. - drop tokenCtl binary-- pysmbios has a *much* improved version
  266. * Wed Aug 22 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.9
  267. - Fix a couple of failure-to-check-return on fopen. most were unit-test code
  268. only, but two or three were in regular code.
  269. - Add hinting to the memory class, so that it can intelligently close /dev/mem
  270. file handle when it is not needed (which is most of the time). it only
  271. leaves it open when it is scanning, so speed is not impacted.
  272. * Tue Aug 6 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.8
  273. - new upstream
  274. * Tue Apr 3 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.6
  275. - critical bugfix for dellBiosUpdate utility for packet mode
  276. - autoconf/automake support for automatically building docs
  277. - more readable 'make' lines by splitting out env vars
  278. - remove run_cppunit option... always run unit tests.
  279. - update autoconf/automake utilities to latest version
  280. - fix LDFLAGS to not overwrite user entered LDFLAGS
  281. - add automatic doxygen build of docs
  282. - fix urls of public repos
  283. - remove yum repo page in favor of official page from docs
  284. - split dmi table entry point from smbios table entry point
  285. - support legacy _DMI_ tables
  286. - fix support for EFI-based imacs without proper _SM_ anchor
  287. * Tue Mar 20 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.5
  288. - rpmlint cleanups
  289. - Add dellLEDCtl binary
  290. - update AUTHORS file to add credit for dellLEDCtl
  291. - update doc/DellToken.txt to add a few more useful tokens.
  292. - updated build system to create documentation
  293. - skip cppunit dep on .elX builds (not in EPEL yet)
  294. * Mon Mar 12 2007 Michael E Brown <michael_e_brown at dell.com> - 0.13.4-1
  295. - Added dellWirelessCtl binary
  296. - Added 'static' makefile target to build static binaries and clean them as well
  297. - fix for signed/unsigned bug in probes binary. CPU temp misreported
  298. - simplify interface for DELL_CALLING_INTERFACE_SMI, autodetect Port/Magic
  299. - document all of the tokens for controlling wireless on dell notebooks
  300. - enums for SMI args/res to make code match docs better (cbRES1 = res[0], which
  301. was confusing.
  302. - helper functions isTokenActive() and activateToken() to simplify token API.
  303. - Added missing windows .cpp files to the dist tarball for those who compile
  304. windows from dist tarball vs source control
  305. - Add support for EFI based machines without backwards compatible smbios table
  306. entry point in 0xF0000 block.
  307. - Added wirelessSwitchControl() and wirelessRadioControl() API for newer
  308. laptops.
  309. - fixed bug in TokenDA activate() code where it wasnt properly using SMI
  310. (never worked, but apparently wasnt used until now.)
  311. * Tue Oct 3 2006 Michael E Brown <Michael_E_Brown@Dell.com> - 0.13.0-1
  312. - autotools conversion
  313. - add Changelog
  314. * Tue Sep 26 2006 Michael E Brown <michael_e_brown at dell.com> - 0.12.4-1
  315. - Changes per Fedora Packaging Guidelines to prepare to submit to Extras.
  316. - Add in a changelog entry per Fedora Packaging Guidelines...