libsmbios-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. Name: libsmbios
  2. Version: 2.4.3
  3. Release: 2%{?_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. %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. export PYTHON=%{__python3}
  97. %configure
  98. mkdir -p out/libsmbios_c
  99. mkdir -p out/libsmbios_c++
  100. make %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log
  101. echo \%doc _build/build-%{_arch}.log > buildlogs.txt
  102. %install
  103. rm -rf %{buildroot}
  104. mkdir %{buildroot}
  105. cd _build
  106. TOPDIR=..
  107. make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
  108. mkdir -p %{buildroot}/%{_includedir}
  109. mkdir -p %{buildroot}/%{_bindir}
  110. cp -a $TOPDIR/src/include/* %{buildroot}/%{_includedir}/
  111. cp -a out/public-include/* %{buildroot}/%{_includedir}/
  112. rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
  113. rm -f %{buildroot}/%{_includedir}/Makefile.am
  114. find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \;
  115. mv out/libsmbios_c++ out/libsmbios_c++-%{_arch}
  116. mv out/libsmbios_c out/libsmbios_c-%{_arch}
  117. rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
  118. %find_lang %{lang_dom}
  119. touch files-yum-dellsysid
  120. touch files-smbios-utils-python3
  121. touch files-python3-smbios
  122. cat > files-python3-smbios <<-EOF
  123. %{python3_sitearch}/*
  124. EOF
  125. cat > files-smbios-utils-python3 <<-EOF
  126. %dir %{_sysconfdir}/libsmbios
  127. %config(noreplace) %{_sysconfdir}/libsmbios/*
  128. # python utilities
  129. %{_sbindir}/smbios-sys-info
  130. %{_sbindir}/smbios-token-ctl
  131. %{_sbindir}/smbios-passwd
  132. %{_sbindir}/smbios-wakeup-ctl
  133. %{_sbindir}/smbios-wireless-ctl
  134. %{_sbindir}/smbios-lcd-brightness
  135. %{_sbindir}/smbios-keyboard-ctl
  136. %{_sbindir}/smbios-thermal-ctl
  137. %{_sbindir}/smbios-battery-ctl
  138. # data files
  139. %{_datadir}/smbios-utils
  140. EOF
  141. %clean
  142. rm -rf %{buildroot}
  143. %post -p /sbin/ldconfig
  144. %postun -p /sbin/ldconfig
  145. %files -f _build/%{lang_dom}.lang
  146. %defattr(-,root,root,-)
  147. %license COPYING* src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
  148. %doc README*
  149. %{_libdir}/libsmbios_c.so.*
  150. %files -n libsmbios-devel -f _build/buildlogs.txt
  151. %defattr(-,root,root,-)
  152. %{_includedir}/smbios
  153. %{_includedir}/smbios_c
  154. %{_libdir}/libsmbios_c.so
  155. %{_libdir}/pkgconfig/*.pc
  156. %doc _build/out/libsmbios_c++-%{_arch}
  157. %doc _build/out/libsmbios_c-%{_arch}
  158. %files -n smbios-utils
  159. # opensuse 11.1 enforces non-empty file list :(
  160. %defattr(-,root,root,-)
  161. %license COPYING-GPL COPYING-OSL
  162. %doc README*
  163. # no other files.
  164. %files -n smbios-utils-bin
  165. %defattr(-,root,root,-)
  166. %license COPYING-GPL COPYING-OSL
  167. %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
  168. %doc README*
  169. #
  170. # new C utilities
  171. %{_sbindir}/smbios-state-byte-ctl
  172. %{_sbindir}/smbios-get-ut-data
  173. %{_sbindir}/smbios-upflag-ctl
  174. %{_sbindir}/smbios-sys-info-lite
  175. %files -n python3-smbios -f _build/files-python3-smbios
  176. %defattr(-,root,root,-)
  177. %license COPYING-GPL COPYING-OSL
  178. %doc README*
  179. %files -n smbios-utils-python3 -f _build/files-smbios-utils-python3
  180. %defattr(-,root,root,-)
  181. %license COPYING-GPL COPYING-OSL
  182. %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
  183. %doc README*
  184. %changelog
  185. * Tue Aug 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.3-2
  186. - rebuilt with python3.8.
  187. * Sat Apr 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.3-1
  188. - new upstream release.
  189. - dropped python2 support.
  190. - added python3 support.
  191. - truncated %%changelog: old logs are ChangeLog.fedora.
  192. * Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.0-1
  193. - new upstream release.
  194. * Tue Feb 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.2.28-2
  195. - rebuilt on current VineSeed
  196. - added Japanese summary
  197. * Thu Feb 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.28-1
  198. - update to 2.2.28
  199. * Sun Apr 24 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.26-1
  200. - merged with upstream package
  201. * Sat May 24 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.1-3
  202. - initial build for Vine Linux