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