]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
- package slabinfo
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
fea1e605 1# TODO
52583efa 2# - optflags
f57fcd71 3
49fba13a
ER
4#
5# Conditional build:
6%bcond_without verbose # verbose build (V=1)
db5f9ac9 7%bcond_without perf # perf tools
49fba13a 8
178c4b31 9%define rel 0.5
6737dd0a
JB
10%define basever 3.7
11%define postver .1
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
6737dd0a 20# Source0-md5: 21223369d682bcf44bcdfe1521095983
49fba13a
ER
21%if "%{postver}" != ".0"
22Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
6737dd0a 23# Patch0-md5: c391dc1a1b4dae81aaef6f08a0594813
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
ER
65Requires(post,preun,postun): systemd-units >= 38
66Requires: systemd-units >= 0.38
2bd21e06
ER
67Provides: cpufreq-utils = 1:009-0.6.p1
68Provides: cpufrequtils = 1:009-0.6.p1
69Provides: cpupowerutils = 1:009-0.6.p1
70Obsoletes: cpufreq-utils < 1:009-0.6.p1
71Obsoletes: cpufrequtils < 1:009-0.6.p1
72Obsoletes: cpupowerutils < 1:009-0.6.p1
73Obsoletes: cpuspeed < 1:1.5-16
d579af5a 74Requires: %{name}-cpupower-libs = %{version}-%{release}
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}
49fba13a 101Provides: cpupowerutils-devel = 1:009-0.6.p1
49fba13a
ER
102Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
103
4bc5704a 104%description cpupower-libs-devel
bd620db3
JB
105Development files for the cpupower library.
106
107%description cpupower-libs-devel -l pl.UTF-8
108Pliki programistyczne biblioteki cpupower.
49fba13a 109
db5f9ac9
JB
110%package perf-core
111Summary: perf profiler tool (core package)
112Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
fea1e605
ER
113Group: Applications/System
114
db5f9ac9 115%description perf-core
fea1e605
ER
116Perf is a profiler tool for Linux 2.6+ based systems that abstracts
117away CPU hardware differences in Linux performance measurements and
118presents a simple commandline interface. Perf is based on the
119perf_events interface exported by recent versions of the Linux kernel.
120
db5f9ac9
JB
121This package contains core files and scripts.
122
123%description perf-core -l pl.UTF-8
124Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
125odseparowujące od różnic sprzętowych między pomiarami wydajności w
126zależności od procesora oraz udostępniające prosty interfejs linii
127poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
128przez nowe wersje jądra Linuksa.
129
130Ten pakiet zawiera podstawowe pliki i skrypty.
131
132%package perf-gtk
133Summary: perf profiler tool (GTK+ GUI)
134Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
135Group: X11/Applications
136Requires: %{name}-perf-core = %{version}-%{release}
137Provides: %{name}-perf = %{version}-%{release}
138
139%description perf-gtk
140Perf is a profiler tool for Linux 2.6+ based systems that abstracts
141away CPU hardware differences in Linux performance measurements and
142presents a simple commandline interface. Perf is based on the
143perf_events interface exported by recent versions of the Linux kernel.
144
145This package contains GTK+ based GUI.
146
147%description perf-gtk -l pl.UTF-8
148Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
149odseparowujące od różnic sprzętowych między pomiarami wydajności w
150zależności od procesora oraz udostępniające prosty interfejs linii
151poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
152przez nowe wersje jądra Linuksa.
153
154Ten pakiet zawiera graficzny interfejs oparty na GTK+.
155
156%package perf-slang
157Summary: perf profiler tool (Slang TUI)
158Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
159Group: X11/Applications
160Requires: %{name}-perf-core = %{version}-%{release}
161Provides: %{name}-perf = %{version}-%{release}
162
163%description perf-slang
164Perf is a profiler tool for Linux 2.6+ based systems that abstracts
165away CPU hardware differences in Linux performance measurements and
166presents a simple commandline interface. Perf is based on the
167perf_events interface exported by recent versions of the Linux kernel.
168
169This package contains Slang based TUI.
170
171%description perf-slang -l pl.UTF-8
bd620db3
JB
172Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
173odseparowujące od różnic sprzętowych między pomiarami wydajności w
174zależności od procesora oraz udostępniające prosty interfejs linii
175poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
176przez nowe wersje jądra Linuksa.
177
db5f9ac9
JB
178Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
179
180%package -n bash-completion-perf
181Summary: Bash completion for perf command
182Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
183Group: Applications/Shells
184Requires: %{name}-perf = %{version}-%{release}
185Requires: bash-completion
186
187%description -n bash-completion-perf
188Bash completion for perf command.
189
190%description -n bash-completion-perf -l pl.UTF-8
191Bashowe uzupełnianie parametrów dla polecenia perf.
192
49fba13a
ER
193%prep
194%setup -qc
195cd linux-%{basever}
196
197%if "%{postver}" != ".0"
198%patch0 -p1
199%endif
200
201%build
202cd linux-%{basever}
203
204# cpupower
205%{__make} -C tools/power/cpupower \
60972f76 206 %{makeopts} \
49fba13a
ER
207 CPUFREQ_BENCH=false
208
209%ifarch %{ix86}
210%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
60972f76 211 %{makeopts} \
49fba13a
ER
212%endif
213
214%ifarch %{x8664}
215%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
60972f76 216 %{makeopts}
49fba13a
ER
217%endif
218
219%ifarch %{ix86} %{x8664}
220%{__make} -C tools/power/x86/x86_energy_perf_policy \
60972f76 221 %{makeopts}
49fba13a 222%{__make} -C tools/power/x86/turbostat \
60972f76 223 %{makeopts}
49fba13a
ER
224%endif
225
701b458f
JB
226# slabinfo
227%{__make} -C tools/vm \
228 CC="%{__cc}" \
229 CFLAGS="%{rpmcflags} -Wall -Wextra"
230
fea1e605
ER
231%if %{with perf}
232# perf slang version
233PWD=${PWD:-$(pwd)}
234install -d $PWD/perf-{slang,gtk}
52583efa 235%{__make} -C tools/perf all man \
fea1e605
ER
236 O=$PWD/perf-slang \
237 NO_GTK2=1 \
60972f76 238 %{makeopts} \
fea1e605
ER
239 prefix=%{_prefix} \
240 perfexecdir=%{_datadir}/perf-core \
241 template_dir=%{_datadir}/perf-core/templates
242
243# perf gtk version
52583efa 244%{__make} -C tools/perf all man \
fea1e605 245 O=$PWD/perf-gtk \
60972f76 246 %{makeopts} \
fea1e605
ER
247 prefix=%{_prefix} \
248 perfexecdir=%{_datadir}/perf-core \
249 template_dir=%{_datadir}/perf-core/templates
250%endif
251
dd28be58
JK
252# gen_init_cpio
253%{__make} -C usr gen_init_cpio \
60972f76 254 %{makeopts} \
dd28be58 255
49fba13a
ER
256%install
257rm -rf $RPM_BUILD_ROOT
258cd linux-%{basever}
259
bd620db3 260%{__make} -C tools/power/cpupower install \
49fba13a
ER
261 DESTDIR=$RPM_BUILD_ROOT \
262 libdir=%{_libdir} \
263 mandir=%{_mandir} \
264 CPUFREQ_BENCH=false
265
266%find_lang cpupower
267mv cpupower.lang ..
268
f57fcd71
ER
269install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
270cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
271cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
272
49fba13a 273%ifarch %{ix86}
701b458f 274install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a
ER
275%endif
276%ifarch %{x8664}
701b458f 277install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a
ER
278%endif
279
701b458f
JB
280install tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
281
49fba13a
ER
282%ifarch %{ix86} %{x8664}
283install -d $RPM_BUILD_ROOT%{_mandir}/man8
284# broken makefile, install manually
285%if 0
286%{__make} install \
287 -C tools/power/x86/x86_energy_perf_policy \
288 DESTDIR=$RPM_BUILD_ROOT
289%else
290cd tools/power/x86/x86_energy_perf_policy
291install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
292install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
293cd -
294%endif
295
296# broken makefile, install manually
297%if 0
298%{__make} install \
299 -C tools/power/x86/turbostat \
300 DESTDIR=$RPM_BUILD_ROOT
301%else
302cd tools/power/x86/turbostat
303install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
304install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
fea1e605
ER
305cd -
306%endif
49fba13a 307%endif
fea1e605
ER
308
309%if %{with perf}
310# perf slang
311PWD=${PWD:-$(pwd)}
312# perf slang version
313%{__make} -j1 install install-man \
314 -C tools/perf \
315 O=$PWD/perf-slang \
316 NO_GTK2=1 \
317 CC="%{__cc}" \
318 %{?with_verbose:V=1} \
319 prefix=%{_prefix} \
320 perfexecdir=%{_datadir}/perf-core \
321 template_dir=%{_datadir}/perf-core/templates \
322 DESTDIR=$RPM_BUILD_ROOT
db5f9ac9 323%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,-slang}
fea1e605
ER
324
325# perf gtk
326%{__make} -j1 install install-man \
327 -C tools/perf \
328 O=$PWD/perf-gtk \
329 CC="%{__cc}" \
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
db5f9ac9
JB
335%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,-gtk}
336
337%py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
338%py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
49fba13a
ER
339%endif
340
dd28be58 341# gen_init_cpio
60972f76 342install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
dd28be58 343
49fba13a
ER
344%clean
345rm -rf $RPM_BUILD_ROOT
346
4bc5704a
JK
347%post cpupower-libs -p /sbin/ldconfig
348%postun cpupower-libs -p /sbin/ldconfig
49fba13a 349
f57fcd71
ER
350%post cpupower
351%systemd_post cpupower.service
352
353%preun cpupower
354%systemd_preun cpupower.service
355
356%postun cpupower
357%systemd_reload
358
4bc5704a 359%files
49fba13a 360%defattr(644,root,root,755)
701b458f
JB
361%attr(755,root,root) %{_bindir}/gen_init_cpio
362%attr(755,root,root) %{_bindir}/slabinfo
49fba13a
ER
363%ifarch %{ix86} %{x8664}
364%attr(755,root,root) %{_bindir}/centrino-decode
365%attr(755,root,root) %{_bindir}/powernow-k8-decode
366%endif
49fba13a
ER
367%ifarch %{ix86} %{x8664}
368%attr(755,root,root) %{_bindir}/turbostat
369%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
bd620db3
JB
370%{_mandir}/man8/turbostat.8*
371%{_mandir}/man8/x86_energy_perf_policy.8*
49fba13a
ER
372%endif
373
4bc5704a
JK
374%files cpupower -f cpupower.lang
375%defattr(644,root,root,755)
376%attr(755,root,root) %{_bindir}/cpupower
bd620db3 377%{_mandir}/man1/cpupower*.1*
f57fcd71
ER
378%{systemdunitdir}/cpupower.service
379%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
4bc5704a
JK
380
381%files cpupower-libs
49fba13a
ER
382%defattr(644,root,root,755)
383%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
bd620db3 384%attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
49fba13a 385
4bc5704a 386%files cpupower-libs-devel
49fba13a 387%defattr(644,root,root,755)
bd620db3 388%attr(755,root,root) %{_libdir}/libcpupower.so
49fba13a 389%{_includedir}/cpufreq.h
fea1e605
ER
390
391%if %{with perf}
db5f9ac9 392%files perf-core
fea1e605 393%defattr(644,root,root,755)
fea1e605
ER
394%{_mandir}/man1/perf*.1*
395%dir %{_datadir}/perf-core
396%attr(755,root,root) %{_datadir}/perf-core/perf-archive
397
398%dir %{_datadir}/perf-core/scripts
399
400%dir %{_datadir}/perf-core/scripts/perl
401%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
402%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
403%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
404%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
405%{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
406%dir %{_datadir}/perf-core/scripts/perl/bin
407%attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
408%{_datadir}/perf-core/scripts/perl/*.pl
409
410%dir %{_datadir}/perf-core/scripts/python
411%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
412%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
413%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
414%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
db5f9ac9 415%{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
fea1e605
ER
416%dir %{_datadir}/perf-core/scripts/python/bin
417%attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
db5f9ac9
JB
418%{_datadir}/perf-core/scripts/python/*.py*
419
420%files perf-gtk
421%defattr(644,root,root,755)
422%attr(755,root,root) %{_bindir}/perf-gtk
423
424%files perf-slang
425%defattr(644,root,root,755)
426%attr(755,root,root) %{_bindir}/perf-slang
427
428%files -n bash-completion-perf
429%defattr(644,root,root,755)
430/etc/bash_completion.d/perf
fea1e605 431%endif
This page took 0.143376 seconds and 4 git commands to generate.