cpuspeed-vl.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. Summary: CPU Frequency adjusting daemon.
  2. Summary(ja): CPU 周波数調整デーモン
  3. Name: cpuspeed
  4. Version: 1.5
  5. Release: 1%{?_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. BuildPreReq: automake autoconf util-linux groff gettext
  19. ExclusiveArch: i386 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. * Thu Jun 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5-1
  76. - new upstream release
  77. - update cpuspeed.init, cpuspeed.conf
  78. - use ondemand governor by default.
  79. - comment out older settings.
  80. - add %%triggerpostun to relpace cpuspeed.conf if upgrade from
  81. older (userspace) version.
  82. * Sun Aug 17 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-3
  83. - fix typo in %%postun
  84. - spec in utf8
  85. * Sun Apr 13 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2.1-2
  86. - update cpuspeed.init & cpuspeed.conf
  87. - use userspace governor (and cpuspeed daemon) as default
  88. - set some default values from previous cpuspeed.conf
  89. - add "|| ;" in %%postun script to avoid scriptlet failure
  90. * Fri Apr 11 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2.1-1
  91. - update Source1&2 (based on fedora development)
  92. - add Patch4 for multicore-workaround (from fedora development)
  93. - apply new versioning policy
  94. * Thu Nov 01 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl7
  95. - add e_powersaver and acpi-cpufreq to driver list.
  96. - change default cpuspeed.conf
  97. - modify polling interval and threshold to change cpu speed
  98. more frequently.
  99. * Sat Nov 18 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl6
  100. - change default cpuspeed.conf
  101. - set polling interval to change cpu speed more frequently.
  102. - set cpu idle percentage threshold.
  103. * Sat Oct 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl5
  104. - do not load cpufreq-nforce2 automatically (<BTS:247>)
  105. * Thu Sep 21 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl4
  106. - update cpuspeed.init to load cpufreq driver automatically.
  107. * Thu Sep 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl3
  108. - add Patch10 to modify default configuration.
  109. - add Documents to %%files (<BTS:180>)
  110. - restart daemon on upgrade
  111. * Sun Jun 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl2
  112. - add Japanese summary and description
  113. * Mon Jun 13 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl1
  114. - initial build for Vine Linux based on FC package.
  115. * Mon May 9 2005 Dave Jones <davej@redhat.com>
  116. - Fix debuginfo generation.
  117. * Wed Apr 6 2005 Dave Jones <davej@redhat.com>
  118. - Don't count nice time as idle time. (#132383)
  119. * Tue Mar 1 2005 Dave Jones <davej@redhat.com>
  120. - Rebuild for gcc4.
  121. * Tue Feb 8 2005 Dave Jones <davej@redhat.com>
  122. - Rebuild with -D_FORTIFY_SOURCE=2
  123. * Fri Feb 4 2005 Dave Jones <davej@redhat.com>
  124. - Enable builds for PPC (#147089)
  125. * Tue Jan 11 2005 Dave Jones <davej@redhat.com>
  126. - Add missing Obsoletes: kernel-utils
  127. * Mon Jan 10 2005 Dave Jones <davej@redhat.com>
  128. - Update to upstream 1.2.1 release.
  129. * Sat Dec 18 2004 Dave Jones <davej@redhat.com>
  130. - Initial packaging, split out from kernel-utils.