hddtemp-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. %bcond_with systemd
  2. %global _hardened_build 1
  3. %global beta beta15
  4. Name: hddtemp
  5. Version: 0.3
  6. Release: 0.36.%{beta}%{?_dist_release}%{?with_systemd:.systemd}
  7. Summary: Hard disk temperature tool
  8. Summary(ja): HDD温度測定ツール
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. License: GPLv2+
  12. URL: http://savannah.nongnu.org/projects/hddtemp/
  13. Source0: http://download.savannah.nongnu.org/releases/hddtemp/%{name}-%{version}-%{beta}.tar.bz2
  14. Source1: %{name}.db
  15. Source2: %{name}.service
  16. Source3: %{name}.sysconfig
  17. Source4: %{name}.pam
  18. Source5: %{name}.consoleapp
  19. Patch0: 0001-Try-attribute-190-if-194-doesn-t-exist.patch
  20. Patch1: http://ftp.debian.org/debian/pool/main/h/hddtemp/hddtemp_0.3-beta15-52.diff.gz
  21. # https://bugzilla.redhat.com/show_bug.cgi?id=717479
  22. # https://bugzilla.redhat.com/show_bug.cgi?id=710055
  23. Patch2: %{name}-0.3-beta15-autodetect-717479.patch
  24. Patch3: 0001-Allow-binding-to-a-listen-address-that-doesn-t-exist.patch
  25. Patch4: fix-model-length.patch
  26. # https://bugzilla.redhat.com/show_bug.cgi?id=1555871
  27. Patch5: %{name}-user-context-type.patch
  28. BuildRequires: gettext
  29. %if %{with systemd}
  30. # systemd >= 186 for scriptlet macros
  31. BuildRequires: systemd >= 186
  32. Requires(post): systemd
  33. Requires(preun): systemd
  34. Requires(postun): systemd
  35. Requires: %{_bindir}/consolehelper
  36. %endif
  37. %description
  38. hddtemp is a tool that gives you the temperature of your hard drive by
  39. reading S.M.A.R.T. information.
  40. %description -l ja
  41.  hddtempは、S.M.A.R.T.情報を読み取りHDD温度を出力します。
  42. %prep
  43. %setup -q -n %{name}-%{version}-%{beta}
  44. %patch1 -p1
  45. %patch2 -p1
  46. %patch3 -p1
  47. %patch0 -p1
  48. %patch4 -p1
  49. %patch5 -p1
  50. sed -i -e 's|/etc/hddtemp.db|/usr/share/misc/hddtemp.db|' doc/hddtemp.8
  51. chmod -x contribs/analyze/*
  52. rm COPYING ; cp -p GPL-2 COPYING
  53. cp -p debian/changelog changelog.debian
  54. %build
  55. %configure --disable-dependency-tracking
  56. make %{?_smp_mflags}
  57. %install
  58. make install DESTDIR=$RPM_BUILD_ROOT
  59. install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/misc/hddtemp.db
  60. %if %{with systemd}
  61. install -Dpm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/hddtemp.service
  62. %endif
  63. install -Dpm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/hddtemp
  64. install -dm 755 $RPM_BUILD_ROOT%{_bindir}
  65. ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/hddtemp
  66. install -Dpm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/hddtemp
  67. install -Dpm 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/hddtemp
  68. %find_lang %{name}
  69. %if %{with systemd}
  70. %post
  71. %systemd_post hddtemp.service
  72. %preun
  73. %systemd_preun hddtemp.service
  74. %postun
  75. %systemd_postun_with_restart hddtemp.service
  76. %endif
  77. %files -f %{name}.lang
  78. %license COPYING
  79. %doc ChangeLog changelog.debian README TODO contribs/
  80. %config(noreplace) %{_sysconfdir}/sysconfig/hddtemp
  81. %config(noreplace) %{_sysconfdir}/pam.d/hddtemp
  82. %config(noreplace) %{_sysconfdir}/security/console.apps/hddtemp
  83. %if %{with systemd}
  84. %{_unitdir}/hddtemp.service
  85. %endif
  86. %{_bindir}/hddtemp
  87. %{_sbindir}/hddtemp
  88. %config(noreplace) /usr/share/misc/hddtemp.db
  89. %{_mandir}/man8/hddtemp.8*
  90. %changelog
  91. * Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3-0.36.beta15
  92. - imported Patch5 from rawhide.
  93. * Sun Apr 24 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3-0.35.beta15
  94. - initial build for Vine Linux.
  95. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.34.beta15
  96. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  97. * Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.33.beta15
  98. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  99. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.32.beta15
  100. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  101. * Fri Mar 07 2014 Jaromir Capik <jcapik@redhat.com> - 0.3-0.31.beta15
  102. - Fixing the model string size [24 -> 40] (#1061649)
  103. * Sat Jan 18 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.30.beta15
  104. - Improve comments in database (#1054593, Edward Kuns).
  105. * Sat Jan 18 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.29.beta15
  106. - Patch to try attribute 190 if 194 doesn't exist for defaults (#1054593).
  107. - Trim down database to just entries not covered by defaults.
  108. - Add some Samsung SSD's lacking a sensor to the database.
  109. * Thu Jan 9 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.28.beta15
  110. - Patch to allow binding to a listen address that doesn't exist yet.
  111. - Use systemd macros in scriptlets (#850145).
  112. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.27.beta15
  113. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  114. * Fri Jan 25 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.26.beta15
  115. - Drop obsolete After=syslog.target from systemd unit, add Documentation.
  116. - Drop obsolete sysv to systemd migration scriptlets.
  117. - Drop obsolete specfile constructs.
  118. - Update Debian patch set to 0.3-beta15-52.
  119. * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.25.beta15
  120. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  121. * Mon Apr 23 2012 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.23.beta15
  122. - Build with hardening flags on.
  123. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.23.beta15
  124. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  125. * Thu Aug 18 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.22.beta15
  126. - Migrate to systemd, patch to glob usual device names w/o arguments (#717479).
  127. - Update Debian patch set to 0.3-beta15-48, ship its changelog in docs.
  128. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.21.beta15
  129. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  130. * Sun Feb 14 2010 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.20.beta15
  131. - Patch to fix ix86 build if sys/ucontext.h is pulled in by signal.h (#564857).
  132. * Thu Aug 20 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.19.beta15
  133. - Try to start daemon for all disks if none are specified in sysconfig.
  134. - Update URLs.
  135. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.18.beta15
  136. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  137. * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-0.17.beta15
  138. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  139. * Wed Oct 1 2008 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.16.beta15
  140. - Sync with Debian's 0.3-beta15-45 for a fix for undesired spin-ups with
  141. most current drives (#464912).
  142. * Sat Feb 9 2008 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.15.beta15
  143. - Sync with Debian's 0.3-beta15-38.
  144. - Update drive database to 2007-09-14.
  145. - Trim pre-2006 changelog entries.
  146. * Wed Sep 5 2007 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.14.beta15
  147. - Adjust server chkconfig start/stop priorities to start before gkrellmd,
  148. other cosmetic init script tweaks.
  149. - Mark hddtemp.db as %%config(noreplace).
  150. * Mon Aug 6 2007 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.13.beta15
  151. - License: GPLv2+
  152. * Tue Jul 10 2007 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.12.beta15
  153. - Improve init script LSB compliance.
  154. * Tue Jan 9 2007 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.11.beta15
  155. - SATA sense fix (#221100, Jens Axboe).
  156. * Sun Dec 31 2006 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.10.beta15
  157. - Apply patches from Debian containing bunch of hddtemp.db updates and
  158. guess mode improvements for drives not in the database.
  159. * Wed Aug 30 2006 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.9.beta15
  160. - Rebuild.
  161. * Wed May 3 2006 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.8.beta15
  162. - 0.3-beta15, drive database 2006-04-26.
  163. - Specfile cleanups.
  164. * Wed Feb 8 2006 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.8.beta14
  165. - Update drive database to 2006-02-07.
  166. * Wed Jan 18 2006 Ville Skyttä <ville.skytta@iki.fi> - 0.3-0.7.beta14
  167. - Update drive database to 2006-01-18.
  168. - Init script is not a config file.
  169. - Mark console.perms snippet as noreplace.