cpuspeed-vl.spec 5.2 KB

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