]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
up to 3.8.4
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
bb6b0f50
ER
1# TODO:
2# - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
3# -n python-perf?
4
49fba13a
ER
5# Conditional build:
6%bcond_without verbose # verbose build (V=1)
db5f9ac9 7%bcond_without perf # perf tools
49fba13a 8
4aa272ab 9%define rel 1
b4d3d8ff
ER
10%define basever 3.8
11%define postver .4
49fba13a 12Summary: Assortment of tools for the Linux kernel
bd620db3 13Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
49fba13a
ER
14Name: kernel-tools
15Version: %{basever}%{postver}
16Release: %{rel}
17License: GPL v2
fea1e605 18Group: Applications/System
49fba13a 19Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
b4d3d8ff 20# Source0-md5: 1c738edfc54e7c65faeb90c436104e2f
49fba13a
ER
21%if "%{postver}" != ".0"
22Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
b4d3d8ff 23# Patch0-md5: 46326c8ccbe75d8625937fd5bc847eb5
49fba13a 24%endif
f57fcd71
ER
25Source1: cpupower.service
26Source2: cpupower.config
52583efa 27URL: http://www.kernel.org/
f57fcd71 28BuildRequires: rpmbuild(macros) >= 1.647
49fba13a
ER
29BuildRequires: tar >= 1:1.22
30BuildRequires: xz
fea1e605
ER
31%if %{with perf}
32BuildRequires: asciidoc
52583efa 33BuildRequires: audit-libs-devel
db5f9ac9 34BuildRequires: binutils-devel
52583efa
JB
35BuildRequires: bison
36BuildRequires: docbook-style-xsl
37BuildRequires: elfutils-devel
38BuildRequires: flex
39BuildRequires: gtk+2-devel >= 2.0
40BuildRequires: libunwind-devel >= 0.99
a1c57a8e 41BuildRequires: newt-devel
52583efa
JB
42BuildRequires: perl-devel >= 5.1
43BuildRequires: pkgconfig
44BuildRequires: python-devel
fea1e605 45BuildRequires: rpm-pythonprov
a1c57a8e 46BuildRequires: slang-devel
fea1e605 47BuildRequires: xmlto
fea1e605 48%endif
49fba13a
ER
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
60972f76
ER
51%define makeopts CC="%{__cc}" %{?with_verbose:V=1}
52
49fba13a 53%description
bd620db3
JB
54This package contains the software from tools/ subdirectory from Linux
55kernel source and the supporting documentation.
56
57%description -l pl.UTF-8
58Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
59Linuksa oraz związaną z nim dokumentację.
49fba13a 60
4bc5704a
JK
61%package cpupower
62Summary: cpupower - Shows and sets processor power related values
bd620db3 63Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
4bc5704a 64Group: Applications/System
f57fcd71 65Requires(post,preun,postun): systemd-units >= 38
91fd1f55 66Requires: %{name}-cpupower-libs = %{version}-%{release}
f57fcd71 67Requires: systemd-units >= 0.38
2bd21e06
ER
68Provides: cpufreq-utils = 1:009-0.6.p1
69Provides: cpufrequtils = 1:009-0.6.p1
70Provides: cpupowerutils = 1:009-0.6.p1
71Obsoletes: cpufreq-utils < 1:009-0.6.p1
72Obsoletes: cpufrequtils < 1:009-0.6.p1
73Obsoletes: cpupowerutils < 1:009-0.6.p1
74Obsoletes: cpuspeed < 1:1.5-16
4bc5704a
JK
75
76%description cpupower
60972f76
ER
77cpupower is a collection of tools to examine and tune power saving
78related features of your processor.
4bc5704a 79
bd620db3
JB
80%description cpupower -l pl.UTF-8
81cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
82związanych z oszczędzaniem energii.
83
4bc5704a 84%package cpupower-libs
bd620db3
JB
85Summary: cpupower library
86Summary(pl.UTF-8): Biblioteka cpupower
49fba13a
ER
87Group: Libraries
88
4bc5704a 89%description cpupower-libs
bd620db3
JB
90cpupower library.
91
92%description cpupower-libs -l pl.UTF-8
93Biblioteka cpupower.
49fba13a 94
4bc5704a 95%package cpupower-libs-devel
bd620db3
JB
96Summary: Development files for the cpupower library
97Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
49fba13a 98Group: Development/Libraries
178c4b31
ER
99Requires: %{name} = %{version}-%{release}
100Requires: %{name}-cpupower-libs = %{version}-%{release}
91fd1f55 101Provides: cpufrequtils-devel = 1:009-0.6.p1
49fba13a 102Provides: cpupowerutils-devel = 1:009-0.6.p1
91fd1f55 103Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
49fba13a
ER
104Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
105
4bc5704a 106%description cpupower-libs-devel
bd620db3
JB
107Development files for the cpupower library.
108
109%description cpupower-libs-devel -l pl.UTF-8
110Pliki programistyczne biblioteki cpupower.
49fba13a 111
db5f9ac9
JB
112%package perf-core
113Summary: perf profiler tool (core package)
114Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
fea1e605
ER
115Group: Applications/System
116
db5f9ac9 117%description perf-core
fea1e605
ER
118Perf is a profiler tool for Linux 2.6+ based systems that abstracts
119away CPU hardware differences in Linux performance measurements and
120presents a simple commandline interface. Perf is based on the
121perf_events interface exported by recent versions of the Linux kernel.
122
db5f9ac9
JB
123This package contains core files and scripts.
124
125%description perf-core -l pl.UTF-8
126Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
127odseparowujące od różnic sprzętowych między pomiarami wydajności w
128zależności od procesora oraz udostępniające prosty interfejs linii
129poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
130przez nowe wersje jądra Linuksa.
131
132Ten pakiet zawiera podstawowe pliki i skrypty.
133
134%package perf-gtk
135Summary: perf profiler tool (GTK+ GUI)
136Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
137Group: X11/Applications
138Requires: %{name}-perf-core = %{version}-%{release}
139Provides: %{name}-perf = %{version}-%{release}
140
141%description perf-gtk
142Perf is a profiler tool for Linux 2.6+ based systems that abstracts
143away CPU hardware differences in Linux performance measurements and
144presents a simple commandline interface. Perf is based on the
145perf_events interface exported by recent versions of the Linux kernel.
146
147This package contains GTK+ based GUI.
148
149%description perf-gtk -l pl.UTF-8
150Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
151odseparowujące od różnic sprzętowych między pomiarami wydajności w
152zależności od procesora oraz udostępniające prosty interfejs linii
153poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
154przez nowe wersje jądra Linuksa.
155
156Ten pakiet zawiera graficzny interfejs oparty na GTK+.
157
158%package perf-slang
159Summary: perf profiler tool (Slang TUI)
160Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
161Group: X11/Applications
162Requires: %{name}-perf-core = %{version}-%{release}
163Provides: %{name}-perf = %{version}-%{release}
164
165%description perf-slang
166Perf is a profiler tool for Linux 2.6+ based systems that abstracts
167away CPU hardware differences in Linux performance measurements and
168presents a simple commandline interface. Perf is based on the
169perf_events interface exported by recent versions of the Linux kernel.
170
171This package contains Slang based TUI.
172
173%description perf-slang -l pl.UTF-8
bd620db3
JB
174Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
175odseparowujące od różnic sprzętowych między pomiarami wydajności w
176zależności od procesora oraz udostępniające prosty interfejs linii
177poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
178przez nowe wersje jądra Linuksa.
179
db5f9ac9
JB
180Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
181
182%package -n bash-completion-perf
183Summary: Bash completion for perf command
184Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
185Group: Applications/Shells
186Requires: %{name}-perf = %{version}-%{release}
187Requires: bash-completion
188
189%description -n bash-completion-perf
190Bash completion for perf command.
191
192%description -n bash-completion-perf -l pl.UTF-8
193Bashowe uzupełnianie parametrów dla polecenia perf.
194
49fba13a
ER
195%prep
196%setup -qc
197cd linux-%{basever}
198
199%if "%{postver}" != ".0"
200%patch0 -p1
201%endif
202
203%build
204cd linux-%{basever}
205
206# cpupower
207%{__make} -C tools/power/cpupower \
60972f76 208 %{makeopts} \
fb1ff9fc
JB
209 CPUFREQ_BENCH=false \
210 OPTIMIZATION="%{rpmcflags}" \
211 STRIPCMD=true
49fba13a
ER
212
213%ifarch %{ix86}
214%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
fb1ff9fc
JB
215 CC="%{__cc}" \
216 CFLAGS="%{rpmcflags}"
49fba13a
ER
217%endif
218
219%ifarch %{x8664}
220%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
fb1ff9fc
JB
221 CC="%{__cc}" \
222 CFLAGS="%{rpmcflags}"
49fba13a
ER
223%endif
224
225%ifarch %{ix86} %{x8664}
226%{__make} -C tools/power/x86/x86_energy_perf_policy \
fb1ff9fc
JB
227 CC="%{__cc}" \
228 CFLAGS="%{rpmcflags}"
49fba13a 229%{__make} -C tools/power/x86/turbostat \
fb1ff9fc
JB
230 CC="%{__cc}" \
231 CFLAGS="%{rpmcflags} -Wall"
49fba13a
ER
232%endif
233
701b458f
JB
234# slabinfo
235%{__make} -C tools/vm \
236 CC="%{__cc}" \
237 CFLAGS="%{rpmcflags} -Wall -Wextra"
238
fea1e605
ER
239%if %{with perf}
240# perf slang version
241PWD=${PWD:-$(pwd)}
242install -d $PWD/perf-{slang,gtk}
52583efa 243%{__make} -C tools/perf all man \
fea1e605
ER
244 O=$PWD/perf-slang \
245 NO_GTK2=1 \
60972f76 246 %{makeopts} \
fb1ff9fc 247 CFLAGS_OPTIMIZE="%{rpmcflags}" \
fea1e605
ER
248 prefix=%{_prefix} \
249 perfexecdir=%{_datadir}/perf-core \
250 template_dir=%{_datadir}/perf-core/templates
251
252# perf gtk version
52583efa 253%{__make} -C tools/perf all man \
fea1e605 254 O=$PWD/perf-gtk \
60972f76 255 %{makeopts} \
fb1ff9fc 256 CFLAGS_OPTIMIZE="%{rpmcflags}" \
fea1e605
ER
257 prefix=%{_prefix} \
258 perfexecdir=%{_datadir}/perf-core \
259 template_dir=%{_datadir}/perf-core/templates
260%endif
261
dd28be58
JK
262# gen_init_cpio
263%{__make} -C usr gen_init_cpio \
60972f76 264 %{makeopts} \
fb1ff9fc 265 CFLAGS="%{rpmcflags}"
dd28be58 266
49fba13a
ER
267%install
268rm -rf $RPM_BUILD_ROOT
269cd linux-%{basever}
270
bd620db3 271%{__make} -C tools/power/cpupower install \
49fba13a
ER
272 DESTDIR=$RPM_BUILD_ROOT \
273 libdir=%{_libdir} \
274 mandir=%{_mandir} \
275 CPUFREQ_BENCH=false
276
277%find_lang cpupower
278mv cpupower.lang ..
279
f57fcd71
ER
280install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
281cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
282cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
283
49fba13a 284%ifarch %{ix86}
701b458f 285install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a
ER
286%endif
287%ifarch %{x8664}
701b458f 288install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a
ER
289%endif
290
701b458f
JB
291install tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
292
49fba13a
ER
293%ifarch %{ix86} %{x8664}
294install -d $RPM_BUILD_ROOT%{_mandir}/man8
295# broken makefile, install manually
296%if 0
297%{__make} install \
298 -C tools/power/x86/x86_energy_perf_policy \
299 DESTDIR=$RPM_BUILD_ROOT
300%else
301cd tools/power/x86/x86_energy_perf_policy
302install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
303install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
304cd -
305%endif
306
307# broken makefile, install manually
308%if 0
309%{__make} install \
310 -C tools/power/x86/turbostat \
311 DESTDIR=$RPM_BUILD_ROOT
312%else
313cd tools/power/x86/turbostat
49fba13a 314install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
fea1e605 315cd -
b4d3d8ff 316install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
fea1e605 317%endif
49fba13a 318%endif
fea1e605
ER
319
320%if %{with perf}
321# perf slang
322PWD=${PWD:-$(pwd)}
323# perf slang version
324%{__make} -j1 install install-man \
325 -C tools/perf \
326 O=$PWD/perf-slang \
327 NO_GTK2=1 \
328 CC="%{__cc}" \
fb1ff9fc 329 CFLAGS_OPTIMIZE="%{rpmcflags}" \
fea1e605
ER
330 %{?with_verbose:V=1} \
331 prefix=%{_prefix} \
332 perfexecdir=%{_datadir}/perf-core \
333 template_dir=%{_datadir}/perf-core/templates \
334 DESTDIR=$RPM_BUILD_ROOT
4ca26053 335%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
fea1e605
ER
336
337# perf gtk
338%{__make} -j1 install install-man \
339 -C tools/perf \
340 O=$PWD/perf-gtk \
341 CC="%{__cc}" \
fb1ff9fc 342 CFLAGS_OPTIMIZE="%{rpmcflags}" \
fea1e605
ER
343 %{?with_verbose:V=1} \
344 prefix=%{_prefix} \
345 perfexecdir=%{_datadir}/perf-core \
346 template_dir=%{_datadir}/perf-core/templates \
347 DESTDIR=$RPM_BUILD_ROOT
4ca26053 348%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
db5f9ac9
JB
349
350%py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
351%py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
49fba13a
ER
352%endif
353
dd28be58 354# gen_init_cpio
60972f76 355install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
dd28be58 356
b4d3d8ff
ER
357rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
358
49fba13a
ER
359%clean
360rm -rf $RPM_BUILD_ROOT
361
4bc5704a
JK
362%post cpupower-libs -p /sbin/ldconfig
363%postun cpupower-libs -p /sbin/ldconfig
49fba13a 364
f57fcd71
ER
365%post cpupower
366%systemd_post cpupower.service
367
368%preun cpupower
369%systemd_preun cpupower.service
370
371%postun cpupower
372%systemd_reload
373
4bc5704a 374%files
49fba13a 375%defattr(644,root,root,755)
701b458f
JB
376%attr(755,root,root) %{_bindir}/gen_init_cpio
377%attr(755,root,root) %{_bindir}/slabinfo
49fba13a
ER
378%ifarch %{ix86} %{x8664}
379%attr(755,root,root) %{_bindir}/centrino-decode
380%attr(755,root,root) %{_bindir}/powernow-k8-decode
381%endif
49fba13a
ER
382%ifarch %{ix86} %{x8664}
383%attr(755,root,root) %{_bindir}/turbostat
384%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
bd620db3
JB
385%{_mandir}/man8/turbostat.8*
386%{_mandir}/man8/x86_energy_perf_policy.8*
49fba13a
ER
387%endif
388
4bc5704a
JK
389%files cpupower -f cpupower.lang
390%defattr(644,root,root,755)
391%attr(755,root,root) %{_bindir}/cpupower
bd620db3 392%{_mandir}/man1/cpupower*.1*
f57fcd71
ER
393%{systemdunitdir}/cpupower.service
394%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
4bc5704a
JK
395
396%files cpupower-libs
49fba13a
ER
397%defattr(644,root,root,755)
398%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
bd620db3 399%attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
49fba13a 400
4bc5704a 401%files cpupower-libs-devel
49fba13a 402%defattr(644,root,root,755)
bd620db3 403%attr(755,root,root) %{_libdir}/libcpupower.so
49fba13a 404%{_includedir}/cpufreq.h
fea1e605
ER
405
406%if %{with perf}
db5f9ac9 407%files perf-core
fea1e605 408%defattr(644,root,root,755)
fea1e605
ER
409%{_mandir}/man1/perf*.1*
410%dir %{_datadir}/perf-core
411%attr(755,root,root) %{_datadir}/perf-core/perf-archive
412
413%dir %{_datadir}/perf-core/scripts
414
415%dir %{_datadir}/perf-core/scripts/perl
416%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
417%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
418%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
419%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
420%{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
421%dir %{_datadir}/perf-core/scripts/perl/bin
422%attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
423%{_datadir}/perf-core/scripts/perl/*.pl
424
425%dir %{_datadir}/perf-core/scripts/python
426%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
427%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
428%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
429%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
db5f9ac9 430%{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
fea1e605
ER
431%dir %{_datadir}/perf-core/scripts/python/bin
432%attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
db5f9ac9
JB
433%{_datadir}/perf-core/scripts/python/*.py*
434
435%files perf-gtk
436%defattr(644,root,root,755)
4ca26053 437%attr(755,root,root) %{_bindir}/perf_gtk
db5f9ac9
JB
438
439%files perf-slang
440%defattr(644,root,root,755)
4ca26053 441%attr(755,root,root) %{_bindir}/perf_slang
db5f9ac9
JB
442
443%files -n bash-completion-perf
444%defattr(644,root,root,755)
445/etc/bash_completion.d/perf
fea1e605 446%endif
This page took 0.091783 seconds and 4 git commands to generate.