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: rpm-pythonprov
31 # provides perf.h which util/parse-events.l loads via ../perf.h, and -I/usr/include/slang makes it being loaded first
32 BuildConflicts: Firebird-devel
34 Requires: %{name}-libs = %{version}-%{release}
35 Provides: cpufreq-utils = 1:009-0.6.p1
36 Provides: cpufrequtils = 1:009-0.6.p1
37 Provides: cpupowerutils = 1:009-0.6.p1
38 Obsoletes: cpufreq-utils < 1:009-0.6.p1
39 Obsoletes: cpufrequtils < 1:009-0.6.p1
40 Obsoletes: cpupowerutils < 1:009-0.6.p1
41 Obsoletes: cpuspeed < 1:1.5-16
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 This package contains the tools/ directory from the kernel source and
46 the supporting documentation.
49 Summary: cpupower - Shows and sets processor power related values
50 Group: Applications/System
53 cpupower is a collection of tools to examine and tune power saving related
54 features of your processor.
56 %package cpupower-libs
57 Summary: cpupower libraries
61 %description cpupower-libs
64 %package cpupower-libs-devel
65 Summary: Development files for the cpupower libraries.
67 Group: Development/Libraries
68 Requires: kernel-tools = %{version}-%{release}
69 Requires: kernel-tools-libs = %{version}-%{release}
70 Provides: cpupowerutils-devel = 1:009-0.6.p1
71 Provides: kernel-tools-devel
72 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
74 %description cpupower-libs-devel
75 Development files for the cpupower libraries.
79 Group: Applications/System
82 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
83 away CPU hardware differences in Linux performance measurements and
84 presents a simple commandline interface. Perf is based on the
85 perf_events interface exported by recent versions of the Linux kernel.
91 %if "%{postver}" != ".0"
99 %{__make} -C tools/power/cpupower \
101 %{?with_verbose:V=1} \
105 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
111 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
116 %ifarch %{ix86} %{x8664}
117 %{__make} -C tools/power/x86/x86_energy_perf_policy \
120 %{__make} -C tools/power/x86/turbostat \
128 install -d $PWD/perf-{slang,gtk}
129 %{__make} -C tools/perf \
133 %{?with_verbose:V=1} \
135 perfexecdir=%{_datadir}/perf-core \
136 template_dir=%{_datadir}/perf-core/templates
139 %{__make} -C tools/perf \
142 %{?with_verbose:V=1} \
144 perfexecdir=%{_datadir}/perf-core \
145 template_dir=%{_datadir}/perf-core/templates
149 %{__make} -C usr gen_init_cpio \
154 rm -rf $RPM_BUILD_ROOT
157 %{__make} -C tools/power/cpupower install \
158 DESTDIR=$RPM_BUILD_ROOT \
167 cd tools/power/cpupower/debug/i386
168 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
169 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
173 cd tools/power/cpupower/debug/x86_64
174 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
175 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
179 %ifarch %{ix86} %{x8664}
180 install -d $RPM_BUILD_ROOT%{_mandir}/man8
181 # broken makefile, install manually
184 -C tools/power/x86/x86_energy_perf_policy \
185 DESTDIR=$RPM_BUILD_ROOT
187 cd tools/power/x86/x86_energy_perf_policy
188 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
189 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
193 # broken makefile, install manually
196 -C tools/power/x86/turbostat \
197 DESTDIR=$RPM_BUILD_ROOT
199 cd tools/power/x86/turbostat
200 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
201 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
210 %{__make} -j1 install install-man \
215 %{?with_verbose:V=1} \
217 perfexecdir=%{_datadir}/perf-core \
218 template_dir=%{_datadir}/perf-core/templates \
219 DESTDIR=$RPM_BUILD_ROOT
222 %{__make} -j1 install install-man \
226 %{?with_verbose:V=1} \
228 perfexecdir=%{_datadir}/perf-core \
229 template_dir=%{_datadir}/perf-core/templates \
230 DESTDIR=$RPM_BUILD_ROOT
234 install usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
237 rm -rf $RPM_BUILD_ROOT
239 %post cpupower-libs -p /sbin/ldconfig
240 %postun cpupower-libs -p /sbin/ldconfig
243 %defattr(644,root,root,755)
244 %ifarch %{ix86} %{x8664}
245 %attr(755,root,root) %{_bindir}/centrino-decode
246 %attr(755,root,root) %{_bindir}/powernow-k8-decode
248 %ifarch %{ix86} %{x8664}
249 %attr(755,root,root) %{_bindir}/turbostat
250 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
251 %{_mandir}/man8/turbostat*
252 %{_mandir}/man8/x86_energy_perf_policy*
254 %attr(755,root,root) %{_bindir}/gen_init_cpio
256 %files cpupower -f cpupower.lang
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_bindir}/cpupower
259 %{_mandir}/man[1-8]/cpupower*
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
264 %ghost %{_libdir}/libcpupower.so.0
266 %files cpupower-libs-devel
267 %defattr(644,root,root,755)
268 %{_libdir}/libcpupower.so
269 %{_includedir}/cpufreq.h
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/perf
275 %{_mandir}/man1/perf*.1*
276 %dir %{_datadir}/perf-core
277 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
279 %dir %{_datadir}/perf-core/scripts
281 %dir %{_datadir}/perf-core/scripts/perl
282 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
283 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
284 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
285 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
286 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
287 %dir %{_datadir}/perf-core/scripts/perl/bin
288 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
289 %{_datadir}/perf-core/scripts/perl/*.pl
291 %dir %{_datadir}/perf-core/scripts/python
292 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
293 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
294 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
295 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
296 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py
297 %dir %{_datadir}/perf-core/scripts/python/bin
298 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
299 %{_datadir}/perf-core/scripts/python/*.py