2 # - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
3 # - add -n python-perf?
4 # - without perf bcond does not work (it still builds it)
5 # - add bcond to disable building docs (perf docs)
6 # - install of perf compiles things over again
9 %bcond_without verbose # verbose build (V=1)
10 %bcond_without perf # perf tools
15 Summary: Assortment of tools for the Linux kernel
16 Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
18 Version: %{basever}%{postver}
21 Group: Applications/System
22 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
23 # Source0-md5: 4348c9b6b2eb3144d601e87c19d5d909
24 %if "%{postver}" != ".0"
25 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
26 # Patch0-md5: aa22187ae5cd482a69097e9e59244491
28 Source1: cpupower.service
29 Source2: cpupower.config
30 URL: http://www.kernel.org/
31 BuildRequires: rpmbuild(macros) >= 1.647
32 BuildRequires: tar >= 1:1.22
35 BuildRequires: asciidoc
36 BuildRequires: audit-libs-devel
37 BuildRequires: binutils-devel
39 BuildRequires: docbook-style-xsl
40 BuildRequires: elfutils-devel
42 BuildRequires: gtk+2-devel >= 2.0
43 BuildRequires: libunwind-devel >= 0.99
44 BuildRequires: newt-devel
45 BuildRequires: perl-devel >= 5.1
46 BuildRequires: pkgconfig
47 BuildRequires: python-devel
48 BuildRequires: rpm-pythonprov
49 BuildRequires: slang-devel
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
57 This package contains the software from tools/ subdirectory from Linux
58 kernel source and the supporting documentation.
60 %description -l pl.UTF-8
61 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
62 Linuksa oraz związaną z nim dokumentację.
65 Summary: cpupower - Shows and sets processor power related values
66 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
67 Group: Applications/System
68 Requires(post,preun,postun): systemd-units >= 38
69 Requires: %{name}-cpupower-libs = %{version}-%{release}
70 Requires: systemd-units >= 0.38
71 Provides: cpufreq-utils = 1:009-0.6.p1
72 Provides: cpufrequtils = 1:009-0.6.p1
73 Provides: cpupowerutils = 1:009-0.6.p1
74 Obsoletes: cpufreq-utils < 1:009-0.6.p1
75 Obsoletes: cpufrequtils < 1:009-0.6.p1
76 Obsoletes: cpupowerutils < 1:009-0.6.p1
77 Obsoletes: cpuspeed < 1:1.5-16
80 cpupower is a collection of tools to examine and tune power saving
81 related features of your processor.
83 %description cpupower -l pl.UTF-8
84 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
85 związanych z oszczędzaniem energii.
87 %package cpupower-libs
88 Summary: cpupower library
89 Summary(pl.UTF-8): Biblioteka cpupower
92 %description cpupower-libs
95 %description cpupower-libs -l pl.UTF-8
98 %package cpupower-libs-devel
99 Summary: Development files for the cpupower library
100 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
101 Group: Development/Libraries
102 Requires: %{name} = %{version}-%{release}
103 Requires: %{name}-cpupower-libs = %{version}-%{release}
104 Provides: cpufrequtils-devel = 1:009-0.6.p1
105 Provides: cpupowerutils-devel = 1:009-0.6.p1
106 Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
107 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
109 %description cpupower-libs-devel
110 Development files for the cpupower library.
112 %description cpupower-libs-devel -l pl.UTF-8
113 Pliki programistyczne biblioteki cpupower.
116 Summary: perf profiler tool (core package)
117 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
118 Group: Applications/System
120 %description perf-core
121 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
122 away CPU hardware differences in Linux performance measurements and
123 presents a simple commandline interface. Perf is based on the
124 perf_events interface exported by recent versions of the Linux kernel.
126 This package contains core files and scripts.
128 %description perf-core -l pl.UTF-8
129 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
130 odseparowujące od różnic sprzętowych między pomiarami wydajności w
131 zależności od procesora oraz udostępniające prosty interfejs linii
132 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
133 przez nowe wersje jądra Linuksa.
135 Ten pakiet zawiera podstawowe pliki i skrypty.
138 Summary: perf profiler tool (GTK+ GUI)
139 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
140 Group: X11/Applications
141 Requires: %{name}-perf-core = %{version}-%{release}
142 Provides: %{name}-perf = %{version}-%{release}
144 %description perf-gtk
145 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
146 away CPU hardware differences in Linux performance measurements and
147 presents a simple commandline interface. Perf is based on the
148 perf_events interface exported by recent versions of the Linux kernel.
150 This package contains GTK+ based GUI.
152 %description perf-gtk -l pl.UTF-8
153 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
154 odseparowujące od różnic sprzętowych między pomiarami wydajności w
155 zależności od procesora oraz udostępniające prosty interfejs linii
156 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
157 przez nowe wersje jądra Linuksa.
159 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
162 Summary: perf profiler tool (Slang TUI)
163 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
164 Group: X11/Applications
165 Requires: %{name}-perf-core = %{version}-%{release}
166 Provides: %{name}-perf = %{version}-%{release}
168 %description perf-slang
169 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
170 away CPU hardware differences in Linux performance measurements and
171 presents a simple commandline interface. Perf is based on the
172 perf_events interface exported by recent versions of the Linux kernel.
174 This package contains Slang based TUI.
176 %description perf-slang -l pl.UTF-8
177 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
178 odseparowujące od różnic sprzętowych między pomiarami wydajności w
179 zależności od procesora oraz udostępniające prosty interfejs linii
180 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
181 przez nowe wersje jądra Linuksa.
183 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
185 %package -n bash-completion-perf
186 Summary: Bash completion for perf command
187 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
188 Group: Applications/Shells
189 Requires: %{name}-perf
190 Requires: bash-completion
192 %description -n bash-completion-perf
193 Bash completion for perf command.
195 %description -n bash-completion-perf -l pl.UTF-8
196 Bashowe uzupełnianie parametrów dla polecenia perf.
202 %if "%{postver}" != ".0"
209 # Simple Disk Sleep Monitor
210 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
213 %{__make} -C tools/power/cpupower \
215 CPUFREQ_BENCH=false \
216 OPTIMIZATION="%{rpmcflags}" \
220 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
222 CFLAGS="%{rpmcflags}"
226 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
228 CFLAGS="%{rpmcflags}"
231 %ifarch %{ix86} %{x8664}
232 %{__make} -C tools/power/x86/x86_energy_perf_policy \
234 CFLAGS="%{rpmcflags}"
235 %{__make} -C tools/power/x86/turbostat \
237 CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
241 %{__make} -C tools/vm \
243 CFLAGS="%{rpmcflags} -Wall -Wextra"
248 install -d $PWD/perf-{slang,gtk}
249 %{__make} -C tools/perf all man \
253 CFLAGS_OPTIMIZE="%{rpmcflags}" \
256 perfexecdir=%{_datadir}/perf-core \
257 template_dir=%{_datadir}/perf-core/templates
260 %{__make} -C tools/perf all man \
263 CFLAGS_OPTIMIZE="%{rpmcflags}" \
266 perfexecdir=%{_datadir}/perf-core \
267 template_dir=%{_datadir}/perf-core/templates
271 %{__make} -C usr gen_init_cpio \
273 CFLAGS="%{rpmcflags}"
276 rm -rf $RPM_BUILD_ROOT
279 install -d $RPM_BUILD_ROOT%{_sbindir}
281 %{__make} -C tools/power/cpupower install \
282 DESTDIR=$RPM_BUILD_ROOT \
290 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
291 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
292 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
295 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
298 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
301 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
302 install -p dslm $RPM_BUILD_ROOT%{_sbindir}
304 %ifarch %{ix86} %{x8664}
305 install -d $RPM_BUILD_ROOT%{_mandir}/man8
306 # broken makefile, install manually
309 -C tools/power/x86/x86_energy_perf_policy \
310 DESTDIR=$RPM_BUILD_ROOT
312 cd tools/power/x86/x86_energy_perf_policy
313 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
314 cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
318 # broken makefile, install manually
321 -C tools/power/x86/turbostat \
322 DESTDIR=$RPM_BUILD_ROOT
324 cd tools/power/x86/turbostat
325 cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
327 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
335 %{__make} -j1 install install-man \
340 CFLAGS_OPTIMIZE="%{rpmcflags}" \
342 %{?with_verbose:V=1} \
344 perfexecdir=%{_datadir}/perf-core \
345 template_dir=%{_datadir}/perf-core/templates \
346 DESTDIR=$RPM_BUILD_ROOT
347 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
350 %{__make} -j1 install install-man \
354 CFLAGS_OPTIMIZE="%{rpmcflags}" \
356 %{?with_verbose:V=1} \
358 perfexecdir=%{_datadir}/perf-core \
359 template_dir=%{_datadir}/perf-core/templates \
360 DESTDIR=$RPM_BUILD_ROOT
361 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
363 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
364 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
368 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
370 rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
373 rm -rf $RPM_BUILD_ROOT
375 %post cpupower-libs -p /sbin/ldconfig
376 %postun cpupower-libs -p /sbin/ldconfig
379 %systemd_post cpupower.service
382 %systemd_preun cpupower.service
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_bindir}/gen_init_cpio
390 %attr(755,root,root) %{_bindir}/slabinfo
391 %attr(755,root,root) %{_sbindir}/dslm
392 %ifarch %{ix86} %{x8664}
393 %attr(755,root,root) %{_bindir}/centrino-decode
394 %attr(755,root,root) %{_bindir}/powernow-k8-decode
396 %ifarch %{ix86} %{x8664}
397 %attr(755,root,root) %{_bindir}/turbostat
398 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
399 %{_mandir}/man8/turbostat.8*
400 %{_mandir}/man8/x86_energy_perf_policy.8*
403 %files cpupower -f cpupower.lang
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_bindir}/cpupower
406 %{_mandir}/man1/cpupower*.1*
407 %{systemdunitdir}/cpupower.service
408 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
413 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
415 %files cpupower-libs-devel
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_libdir}/libcpupower.so
418 %{_includedir}/cpufreq.h
422 %defattr(644,root,root,755)
423 %{_mandir}/man1/perf*.1*
424 %dir %{_datadir}/perf-core
425 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
427 %dir %{_datadir}/perf-core/scripts
429 %dir %{_datadir}/perf-core/scripts/perl
430 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
431 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
432 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
433 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
434 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
435 %dir %{_datadir}/perf-core/scripts/perl/bin
436 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
437 %{_datadir}/perf-core/scripts/perl/*.pl
439 %dir %{_datadir}/perf-core/scripts/python
440 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
441 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
442 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
443 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
444 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
445 %dir %{_datadir}/perf-core/scripts/python/bin
446 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
447 %{_datadir}/perf-core/scripts/python/*.py*
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_bindir}/perf_gtk
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_bindir}/perf_slang
457 %files -n bash-completion-perf
458 %defattr(644,root,root,755)
459 /etc/bash_completion.d/perf