3 # - asciidoc used at install stage of perf (should build doc in build section)
4 # - different packages for perf-slang and perf-gtk
7 %bcond_without verbose # verbose build (V=1)
8 %bcond_with perf # perf tools (unfinished)
13 Summary: Assortment of tools for the Linux kernel
15 Version: %{basever}%{postver}
18 Group: Applications/System
19 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
20 # Source0-md5: 1a1760420eac802c541a20ab51a093d1
21 %if "%{postver}" != ".0"
22 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
23 # Patch0-md5: 363e730147333182616cc687345e7fe2
25 BuildRequires: tar >= 1:1.22
28 BuildRequires: asciidoc
29 BuildRequires: newt-devel
30 BuildRequires: rpm-pythonprov
31 BuildRequires: slang-devel
33 # provides perf.h which util/parse-events.l loads via ../perf.h, and -I/usr/include/slang makes it being loaded first
34 BuildConflicts: Firebird-devel
36 Requires: %{name}-libs = %{version}-%{release}
37 Provides: cpufreq-utils = 1:009-0.6.p1
38 Provides: cpufrequtils = 1:009-0.6.p1
39 Provides: cpupowerutils = 1:009-0.6.p1
40 Obsoletes: cpufreq-utils < 1:009-0.6.p1
41 Obsoletes: cpufrequtils < 1:009-0.6.p1
42 Obsoletes: cpupowerutils < 1:009-0.6.p1
43 Obsoletes: cpuspeed < 1:1.5-16
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 This package contains the tools/ directory from the kernel source and
48 the supporting documentation.
51 Summary: cpupower - Shows and sets processor power related values
52 Group: Applications/System
55 cpupower is a collection of tools to examine and tune power saving related
56 features of your processor.
58 %package cpupower-libs
59 Summary: cpupower libraries
63 %description cpupower-libs
66 %package cpupower-libs-devel
67 Summary: Development files for the cpupower libraries.
69 Group: Development/Libraries
70 Requires: kernel-tools = %{version}-%{release}
71 Requires: kernel-tools-libs = %{version}-%{release}
72 Provides: cpupowerutils-devel = 1:009-0.6.p1
73 Provides: kernel-tools-devel
74 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
76 %description cpupower-libs-devel
77 Development files for the cpupower libraries.
81 Group: Applications/System
84 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
85 away CPU hardware differences in Linux performance measurements and
86 presents a simple commandline interface. Perf is based on the
87 perf_events interface exported by recent versions of the Linux kernel.
93 %if "%{postver}" != ".0"
101 %{__make} -C tools/power/cpupower \
103 %{?with_verbose:V=1} \
107 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
113 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
118 %ifarch %{ix86} %{x8664}
119 %{__make} -C tools/power/x86/x86_energy_perf_policy \
122 %{__make} -C tools/power/x86/turbostat \
130 install -d $PWD/perf-{slang,gtk}
131 %{__make} -C tools/perf \
135 %{?with_verbose:V=1} \
137 perfexecdir=%{_datadir}/perf-core \
138 template_dir=%{_datadir}/perf-core/templates
141 %{__make} -C tools/perf \
144 %{?with_verbose:V=1} \
146 perfexecdir=%{_datadir}/perf-core \
147 template_dir=%{_datadir}/perf-core/templates
151 %{__make} -C usr gen_init_cpio \
156 rm -rf $RPM_BUILD_ROOT
159 %{__make} -C tools/power/cpupower install \
160 DESTDIR=$RPM_BUILD_ROOT \
169 cd tools/power/cpupower/debug/i386
170 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
171 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
175 cd tools/power/cpupower/debug/x86_64
176 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
177 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
181 %ifarch %{ix86} %{x8664}
182 install -d $RPM_BUILD_ROOT%{_mandir}/man8
183 # broken makefile, install manually
186 -C tools/power/x86/x86_energy_perf_policy \
187 DESTDIR=$RPM_BUILD_ROOT
189 cd tools/power/x86/x86_energy_perf_policy
190 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
191 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
195 # broken makefile, install manually
198 -C tools/power/x86/turbostat \
199 DESTDIR=$RPM_BUILD_ROOT
201 cd tools/power/x86/turbostat
202 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
203 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
212 %{__make} -j1 install install-man \
217 %{?with_verbose:V=1} \
219 perfexecdir=%{_datadir}/perf-core \
220 template_dir=%{_datadir}/perf-core/templates \
221 DESTDIR=$RPM_BUILD_ROOT
224 %{__make} -j1 install install-man \
228 %{?with_verbose:V=1} \
230 perfexecdir=%{_datadir}/perf-core \
231 template_dir=%{_datadir}/perf-core/templates \
232 DESTDIR=$RPM_BUILD_ROOT
236 install usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
239 rm -rf $RPM_BUILD_ROOT
241 %post cpupower-libs -p /sbin/ldconfig
242 %postun cpupower-libs -p /sbin/ldconfig
245 %defattr(644,root,root,755)
246 %ifarch %{ix86} %{x8664}
247 %attr(755,root,root) %{_bindir}/centrino-decode
248 %attr(755,root,root) %{_bindir}/powernow-k8-decode
250 %ifarch %{ix86} %{x8664}
251 %attr(755,root,root) %{_bindir}/turbostat
252 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
253 %{_mandir}/man8/turbostat*
254 %{_mandir}/man8/x86_energy_perf_policy*
256 %attr(755,root,root) %{_bindir}/gen_init_cpio
258 %files cpupower -f cpupower.lang
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/cpupower
261 %{_mandir}/man[1-8]/cpupower*
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
266 %ghost %{_libdir}/libcpupower.so.0
268 %files cpupower-libs-devel
269 %defattr(644,root,root,755)
270 %{_libdir}/libcpupower.so
271 %{_includedir}/cpufreq.h
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_bindir}/perf
277 %{_mandir}/man1/perf*.1*
278 %dir %{_datadir}/perf-core
279 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
281 %dir %{_datadir}/perf-core/scripts
283 %dir %{_datadir}/perf-core/scripts/perl
284 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
285 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
286 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
287 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
288 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
289 %dir %{_datadir}/perf-core/scripts/perl/bin
290 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
291 %{_datadir}/perf-core/scripts/perl/*.pl
293 %dir %{_datadir}/perf-core/scripts/python
294 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
295 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
296 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
297 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
298 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py
299 %dir %{_datadir}/perf-core/scripts/python/bin
300 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
301 %{_datadir}/perf-core/scripts/python/*.py