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