libsmbios-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. Name: libsmbios
  2. Version: 2.4.3
  3. Release: 3%{?_dist_release}
  4. Summary: Libsmbios C/C++ shared libraries
  5. Summary(ja): Libsmbios C/C++ 共有ライブラリ
  6. Group: system
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. Packager: shaolin, daisuke
  10. License: GPLv2+ or OSL 2.1
  11. URL: https://github.com/dell/libsmbios
  12. Source: https://github.com/dell/libsmbios/archive/v%{version}.tar.gz#/libsmbios-%{version}.tar.gz
  13. Source100: ChangeLog.fedora
  14. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
  15. BuildRequires: strace libxml2-devel gcc-c++ gettext doxygen cppunit-devel pkgconfig python-devel
  16. Obsoletes: python-smbios < %{version}-%{release}
  17. # libsmbios only ever makes sense on intel compatible arches
  18. # no DMI tables on ppc, s390, etc.
  19. ExclusiveArch: x86_64 ia64 %{ix86}
  20. # these are all substituted by autoconf
  21. %define pot_file libsmbios
  22. %define lang_dom libsmbios-2.4-x86_64
  23. %define major %(echo %{version} | sed -e 's/^\\([0-9]*\\)\..*$/\\1/')
  24. %define minor %(echo %{version} | sed -e 's/^[0-9]*\\.\\([0-9]*\\).*$/\\1/')
  25. %define micro %(echo %{version} | sed -e 's/^[0-9]*\\.[0-9]*\\.\\([0-9]*\\).*$/\\1/')
  26. %define extra %{nil}
  27. %description
  28. Libsmbios is a library and utilities that can be used by client programs to get
  29. information from standard BIOS tables, such as the SMBIOS table.
  30. This package provides the C-based libsmbios library, with a C interface.
  31. This package also has a C++-based library, with a C++ interface. It is not
  32. actively maintained, but provided for backwards compatibility. New programs
  33. should use the libsmbios C interface.
  34. %package -n python3-smbios
  35. Summary: Python interface to Libsmbios C library
  36. Summary(ja): libsmbios C ライブラリへの Python インターフェース
  37. Group: programming
  38. BuildRequires: python3-devel python3-setuptools python3-rpm-macros
  39. Requires: %{name} = %{version}-%{release}
  40. Requires: python3
  41. %description -n python3-smbios
  42. This package provides a Python interface to libsmbios
  43. %package -n smbios-utils
  44. Summary: Meta-package that pulls in all smbios binaries and python scripts
  45. Summary(ja): すべての smbios プログラムと python スクリプトをインストールするための仮想パッケージ
  46. Group: admin-tools
  47. Requires: smbios-utils-bin = %{version}-%{release}
  48. Requires: smbios-utils-python3 = %{version}-%{release}
  49. %description -n smbios-utils
  50. This is a meta-package that pulls in the binary libsmbios executables as well
  51. as the python executables.
  52. %package -n smbios-utils-bin
  53. Summary: Binary utilities that use libsmbios
  54. Summary(ja): libsmbios を用いたユーティリティ集
  55. Group: admin-tools
  56. Requires: %{name} = %{version}-%{release}
  57. %description -n smbios-utils-bin
  58. Get BIOS information, such as System product name, product id, service tag and
  59. asset tag.
  60. %package -n smbios-utils-python3
  61. Summary: Python executables that use libsmbios
  62. Summary(ja): libsmbios を用いた Python スクリプト集
  63. Group: admin-tools
  64. Requires: python3-smbios = %{version}-%{release}
  65. Obsoletes: smbios-utils-python < %{version}-%{release}
  66. Provides: smbios-utils-python = %{version}-%{release}
  67. %description -n smbios-utils-python3
  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): libsmbios の開発用ヘッダファイルとライブラリ
  76. Group: programming
  77. Requires: %{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. %debug_package
  84. %prep
  85. %setup -q -n libsmbios-%{version}
  86. find . -type d -exec chmod -f 755 {} \;
  87. find doc src -type f -exec chmod -f 644 {} \;
  88. chmod 755 src/cppunit/*.sh
  89. %build
  90. # this line lets us build an RPM directly from a git tarball
  91. # and retains any customized version information we might have
  92. [ -e ./configure ] || ./autogen.sh --no-configure
  93. mkdir _build
  94. cd _build
  95. echo '../configure "$@"' > configure
  96. chmod +x ./configure
  97. export PYTHON=%{__python3}
  98. %configure
  99. mkdir -p out/libsmbios_c
  100. mkdir -p out/libsmbios_c++
  101. make %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log
  102. echo \%doc _build/build-%{_arch}.log > buildlogs.txt
  103. %install
  104. rm -rf %{buildroot}
  105. mkdir %{buildroot}
  106. cd _build
  107. TOPDIR=..
  108. make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
  109. mkdir -p %{buildroot}/%{_includedir}
  110. mkdir -p %{buildroot}/%{_bindir}
  111. cp -a $TOPDIR/src/include/* %{buildroot}/%{_includedir}/
  112. cp -a out/public-include/* %{buildroot}/%{_includedir}/
  113. rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
  114. rm -f %{buildroot}/%{_includedir}/Makefile.am
  115. find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \;
  116. mv out/libsmbios_c++ out/libsmbios_c++-%{_arch}
  117. mv out/libsmbios_c out/libsmbios_c-%{_arch}
  118. rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
  119. %find_lang %{lang_dom}
  120. touch files-yum-dellsysid
  121. touch files-smbios-utils-python3
  122. touch files-python3-smbios
  123. cat > files-python3-smbios <<-EOF
  124. %{python3_sitearch}/*
  125. EOF
  126. cat > files-smbios-utils-python3 <<-EOF
  127. %dir %{_sysconfdir}/libsmbios
  128. %config(noreplace) %{_sysconfdir}/libsmbios/*
  129. # python utilities
  130. %{_sbindir}/smbios-sys-info
  131. %{_sbindir}/smbios-token-ctl
  132. %{_sbindir}/smbios-passwd
  133. %{_sbindir}/smbios-wakeup-ctl
  134. %{_sbindir}/smbios-wireless-ctl
  135. %{_sbindir}/smbios-lcd-brightness
  136. %{_sbindir}/smbios-keyboard-ctl
  137. %{_sbindir}/smbios-thermal-ctl
  138. %{_sbindir}/smbios-battery-ctl
  139. # data files
  140. %{_datadir}/smbios-utils
  141. EOF
  142. %clean
  143. rm -rf %{buildroot}
  144. %files -f _build/%{lang_dom}.lang
  145. %defattr(-,root,root,-)
  146. %license COPYING* src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
  147. %doc README*
  148. %{_libdir}/libsmbios_c.so.*
  149. %files -n libsmbios-devel -f _build/buildlogs.txt
  150. %defattr(-,root,root,-)
  151. %{_includedir}/smbios
  152. %{_includedir}/smbios_c
  153. %{_libdir}/libsmbios_c.so
  154. %{_libdir}/pkgconfig/*.pc
  155. %doc _build/out/libsmbios_c++-%{_arch}
  156. %doc _build/out/libsmbios_c-%{_arch}
  157. %files -n smbios-utils
  158. # opensuse 11.1 enforces non-empty file list :(
  159. %defattr(-,root,root,-)
  160. %license COPYING-GPL COPYING-OSL
  161. %doc README*
  162. # no other files.
  163. %files -n smbios-utils-bin
  164. %defattr(-,root,root,-)
  165. %license COPYING-GPL COPYING-OSL
  166. %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
  167. %doc README*
  168. #
  169. # new C utilities
  170. %{_sbindir}/smbios-state-byte-ctl
  171. %{_sbindir}/smbios-get-ut-data
  172. %{_sbindir}/smbios-upflag-ctl
  173. %{_sbindir}/smbios-sys-info-lite
  174. %files -n python3-smbios -f _build/files-python3-smbios
  175. %defattr(-,root,root,-)
  176. %license COPYING-GPL COPYING-OSL
  177. %doc README*
  178. %files -n smbios-utils-python3 -f _build/files-smbios-utils-python3
  179. %defattr(-,root,root,-)
  180. %license COPYING-GPL COPYING-OSL
  181. %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
  182. %doc README*
  183. %changelog
  184. * Tue Jun 06 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.3-3
  185. - rebuilt with python3.11.
  186. * Tue Aug 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.3-2
  187. - rebuilt with python3.8.
  188. * Sat Apr 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.3-1
  189. - new upstream release.
  190. - dropped python2 support.
  191. - added python3 support.
  192. - truncated %%changelog: old logs are ChangeLog.fedora.
  193. * Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.0-1
  194. - new upstream release.
  195. * Tue Feb 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.2.28-2
  196. - rebuilt on current VineSeed
  197. - added Japanese summary
  198. * Thu Feb 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.28-1
  199. - update to 2.2.28
  200. * Sun Apr 24 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.26-1
  201. - merged with upstream package
  202. * Sat May 24 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.1-3
  203. - initial build for Vine Linux