cpuspeed-vl.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. Summary: CPU Frequency adjusting daemon.
  2. Summary(ja): CPU 周波数調整デーモン
  3. Name: cpuspeed
  4. Version: 1.5
  5. Release: 3%{?_dist_release}
  6. Group: System Environment/Base
  7. License: GPLv2+
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. Packager: daisuke, kazutaka
  11. Source0: cpuspeed-1.5.tar.bz2
  12. Source1: cpuspeed.init
  13. Source2: cpuspeed.conf
  14. Source3: cpuspeed.8
  15. Patch1: cpuspeed-1.5-Makefile.patch
  16. Patch2: cpuspeed-1.5-no-affected_cpus-fallback.patch
  17. Buildroot: %{_tmppath}/%{name}-%{version}-root
  18. BuildRequires: automake autoconf util-linux groff gettext
  19. ExclusiveArch: %{ix86} x86_64 ppc ppc64
  20. %description
  21. cpuspeed is a daemon that dynamically changes the speed
  22. of your processor(s) depending upon its current workload
  23. if it is capable (needs Intel Speedstep, AMD PowerNow!,
  24. or similar support).
  25. %description -l ja
  26. cpuspeed は、システムの現在のワークロードに応じて CPU の速度(周波数)を
  27. 動的に変化させるデーモンです。これを利用するには Intel の Speedstep や
  28. AMD のPowerNow! などの省電力機構が必要になります。
  29. %prep
  30. %setup -q
  31. %patch1 -p1 -b .make
  32. %patch2 -p1 -b .ac
  33. %build
  34. rm -rf $RPM_BUILD_ROOT
  35. mkdir -p $RPM_BUILD_ROOT%{_sbindir}
  36. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
  37. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/
  38. make
  39. %install
  40. make DESTDIR=$RPM_BUILD_ROOT install
  41. install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/cpuspeed
  42. install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cpuspeed.conf
  43. install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cpuspeed.conf.dist
  44. install -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man8/cpuspeed.8
  45. %clean
  46. [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
  47. %files
  48. %defattr(-,root,root)
  49. %doc CHANGES EXAMPLES CONTRIBUTORS FEATURES README USAGE
  50. %{_sbindir}/cpuspeed
  51. %{_sysconfdir}/rc.d/init.d/cpuspeed
  52. %{_sysconfdir}/cpuspeed.conf.dist
  53. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cpuspeed.conf
  54. %{_mandir}/man8/*
  55. %preun
  56. if [ "$1" = "0" ] ; then
  57. /sbin/chkconfig --del cpuspeed
  58. fi
  59. %postun
  60. if [ "$1" -ge "1" ]; then
  61. service cpuspeed condrestart > /dev/null 2>&1 || :
  62. fi
  63. %post
  64. /sbin/chkconfig --add cpuspeed
  65. %triggerpostun -- cpuspeed < 1.5-1
  66. if [ -f /etc/cpuspeed.conf ]; then
  67. if (! grep -q "GOVERNER=$" /etc/cpuspeed.conf); then
  68. if [ -f /etc/cpuspeed.conf.dist ]; then
  69. cp -f /etc/cpuspeed.conf /etc/cpuspeed.conf.rpmsave
  70. cp -f /etc/cpuspeed.conf.dist /etc/cpuspeed.conf
  71. fi
  72. fi
  73. fi
  74. %changelog
  75. * Tue Jan 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5-3
  76. - update cpuspeed.init for kernel-3.x
  77. * Thu Apr 07 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5-2
  78. - rebuild for Vine 6
  79. - s/BuildPreReq/BuildRequires
  80. * Thu Jun 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5-1
  81. - new upstream release
  82. - update cpuspeed.init, cpuspeed.conf
  83. - use ondemand governor by default.
  84. - comment out older settings.
  85. - add %%triggerpostun to relpace cpuspeed.conf if upgrade from
  86. older (userspace) version.
  87. * Sun Aug 17 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-3
  88. - fix typo in %%postun
  89. - spec in utf8
  90. * Sun Apr 13 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2.1-2
  91. - update cpuspeed.init & cpuspeed.conf
  92. - use userspace governor (and cpuspeed daemon) as default
  93. - set some default values from previous cpuspeed.conf
  94. - add "|| ;" in %%postun script to avoid scriptlet failure
  95. * Fri Apr 11 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2.1-1
  96. - update Source1&2 (based on fedora development)
  97. - add Patch4 for multicore-workaround (from fedora development)
  98. - apply new versioning policy
  99. * Thu Nov 01 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl7
  100. - add e_powersaver and acpi-cpufreq to driver list.
  101. - change default cpuspeed.conf
  102. - modify polling interval and threshold to change cpu speed
  103. more frequently.
  104. * Sat Nov 18 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl6
  105. - change default cpuspeed.conf
  106. - set polling interval to change cpu speed more frequently.
  107. - set cpu idle percentage threshold.
  108. * Sat Oct 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl5
  109. - do not load cpufreq-nforce2 automatically (<BTS:247>)
  110. * Thu Sep 21 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl4
  111. - update cpuspeed.init to load cpufreq driver automatically.
  112. * Thu Sep 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl3
  113. - add Patch10 to modify default configuration.
  114. - add Documents to %%files (<BTS:180>)
  115. - restart daemon on upgrade
  116. * Sun Jun 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl2
  117. - add Japanese summary and description
  118. * Mon Jun 13 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl1
  119. - initial build for Vine Linux based on FC package.
  120. * Mon May 9 2005 Dave Jones <davej@redhat.com>
  121. - Fix debuginfo generation.
  122. * Wed Apr 6 2005 Dave Jones <davej@redhat.com>
  123. - Don't count nice time as idle time. (#132383)
  124. * Tue Mar 1 2005 Dave Jones <davej@redhat.com>
  125. - Rebuild for gcc4.
  126. * Tue Feb 8 2005 Dave Jones <davej@redhat.com>
  127. - Rebuild with -D_FORTIFY_SOURCE=2
  128. * Fri Feb 4 2005 Dave Jones <davej@redhat.com>
  129. - Enable builds for PPC (#147089)
  130. * Tue Jan 11 2005 Dave Jones <davej@redhat.com>
  131. - Add missing Obsoletes: kernel-utils
  132. * Mon Jan 10 2005 Dave Jones <davej@redhat.com>
  133. - Update to upstream 1.2.1 release.
  134. * Sat Dec 18 2004 Dave Jones <davej@redhat.com>
  135. - Initial packaging, split out from kernel-utils.