3 %bcond_without verbose # verbose build (V=1)
8 Summary: Assortment of tools for the Linux kernel
10 Version: %{basever}%{postver}
14 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
15 # Source0-md5: 24153eaaa81dedc9481ada8cd9c3b83d
16 %if "%{postver}" != ".0"
17 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
18 # Patch0-md5: f908f8c222cf4a1988b8bf180df46bb2
20 BuildRequires: tar >= 1:1.22
22 Requires: %{name}-libs = %{version}-%{release}
23 Provides: cpufreq-utils = 1:009-0.6.p1
24 Provides: cpufrequtils = 1:009-0.6.p1
25 Provides: cpupowerutils = 1:009-0.6.p1
26 Obsoletes: cpufreq-utils < 1:009-0.6.p1
27 Obsoletes: cpufrequtils < 1:009-0.6.p1
28 Obsoletes: cpupowerutils < 1:009-0.6.p1
29 Obsoletes: cpuspeed < 1:1.5-16
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 This package contains the tools/ directory from the kernel source and
34 the supporting documentation.
37 Summary: Libraries for the kernels-tools
42 This package contains the libraries built from the tools/ directory
43 from the kernel source.
46 Summary: Assortment of tools for the Linux kernel
48 Group: Development/Libraries
49 Requires: kernel-tools = %{version}-%{release}
50 Requires: kernel-tools-libs = %{version}-%{release}
51 Provides: cpupowerutils-devel = 1:009-0.6.p1
52 Provides: kernel-tools-devel
53 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
55 %description libs-devel
56 This package contains the development files for the tools/ directory
57 from the kernel source.
63 %if "%{postver}" != ".0"
71 %{__make} -C tools/power/cpupower \
73 %{?with_verbose:V=1} \
77 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
83 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
88 %ifarch %{ix86} %{x8664}
89 %{__make} -C tools/power/x86/x86_energy_perf_policy \
92 %{__make} -C tools/power/x86/turbostat \
98 rm -rf $RPM_BUILD_ROOT
101 %{__make} -C tools/power/cpupower install \
102 DESTDIR=$RPM_BUILD_ROOT \
111 cd tools/power/cpupower/debug/i386
112 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
113 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
117 cd tools/power/cpupower/debug/x86_64
118 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
119 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
123 %ifarch %{ix86} %{x8664}
124 install -d $RPM_BUILD_ROOT%{_mandir}/man8
125 # broken makefile, install manually
128 -C tools/power/x86/x86_energy_perf_policy \
129 DESTDIR=$RPM_BUILD_ROOT
131 cd tools/power/x86/x86_energy_perf_policy
132 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
133 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
137 # broken makefile, install manually
140 -C tools/power/x86/turbostat \
141 DESTDIR=$RPM_BUILD_ROOT
143 cd tools/power/x86/turbostat
144 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
145 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
150 rm -rf $RPM_BUILD_ROOT
152 %post libs -p /sbin/ldconfig
153 %postun libs -p /sbin/ldconfig
155 %files -f cpupower.lang
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_bindir}/cpupower
158 %ifarch %{ix86} %{x8664}
159 %attr(755,root,root) %{_bindir}/centrino-decode
160 %attr(755,root,root) %{_bindir}/powernow-k8-decode
162 %{_mandir}/man[1-8]/cpupower*
163 %ifarch %{ix86} %{x8664}
164 %attr(755,root,root) %{_bindir}/turbostat
165 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
166 %{_mandir}/man8/turbostat*
167 %{_mandir}/man8/x86_energy_perf_policy*
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
173 %ghost %{_libdir}/libcpupower.so.0
176 %defattr(644,root,root,755)
177 %{_libdir}/libcpupower.so
178 %{_includedir}/cpufreq.h