]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
- up to 4.19.6
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
bb6b0f50
ER
1# TODO:
2# - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
b1f08c11 3# - add -n python-perf?
b1f08c11 4# - add bcond to disable building docs (perf docs)
a5af5310 5# - install of perf links perf binary again
bb6b0f50 6
49fba13a
ER
7# Conditional build:
8%bcond_without verbose # verbose build (V=1)
0a891de9 9%bcond_without cpupower # cpupower tools
db5f9ac9 10%bcond_without perf # perf tools
ae4c1fd4 11%bcond_without gtk # GTK+ 2.x perf support
5a8bbd03 12%bcond_without libunwind # libunwind perf support
a5af5310 13%bcond_without multilib # multilib perf support
0a891de9 14%bcond_without usbip # usbip utils
5a8bbd03
JR
15
16%ifarch x32
17%undefine with_libunwind
18%endif
a5af5310
JB
19%ifnarch %{x8664}
20%undefine with_multilib
21%endif
49fba13a 22
728c4906
AM
23%define basever 4.19
24%define postver .6
49fba13a 25Summary: Assortment of tools for the Linux kernel
bd620db3 26Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
49fba13a
ER
27Name: kernel-tools
28Version: %{basever}%{postver}
728c4906 29Release: 1
49fba13a 30License: GPL v2
fea1e605 31Group: Applications/System
3109d83e 32Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
728c4906 33# Source0-md5: 740a90cf810c2105df8ee12e5d0bb900
bedc6c43
JR
34Source1: cpupower.service
35Source2: cpupower.config
49fba13a 36%if "%{postver}" != ".0"
3109d83e 37Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
728c4906 38# Patch0-md5: 62b3734bb12b9a74b6b484f877493c41
49fba13a 39%endif
bedc6c43 40Patch1: x32.patch
32b75768 41Patch3: %{name}-perf-update.patch
52583efa 42URL: http://www.kernel.org/
0a891de9 43BuildRequires: bison
89b3b11f 44BuildRequires: docutils
0a891de9 45BuildRequires: flex
4a7175d2 46BuildRequires: gettext-tools
4490164f 47BuildRequires: linux-libc-headers >= 7:4.12
0a891de9 48BuildRequires: ncurses-devel
9596c3d3 49BuildRequires: pciutils-devel
0a891de9 50BuildRequires: pkgconfig
c5a822e3 51BuildRequires: rpmbuild(macros) >= 1.673
49fba13a
ER
52BuildRequires: tar >= 1:1.22
53BuildRequires: xz
fea1e605
ER
54%if %{with perf}
55BuildRequires: asciidoc
52583efa 56BuildRequires: audit-libs-devel
ea7d139b 57BuildRequires: binutils-devel >= 4:2.29
a8b28c3a 58BuildRequires: docbook-dtd45-xml
52583efa
JB
59BuildRequires: docbook-style-xsl
60BuildRequires: elfutils-devel
a5af5310
JB
61%if %{with multilib}
62BuildRequires: gcc-multilib-32
63BuildRequires: gcc-multilib-x32
64%endif
5a8bbd03 65%{?with_libunwind:BuildRequires: libunwind-devel >= 0.99}
60ccbbd3 66BuildRequires: numactl-devel
52583efa 67BuildRequires: perl-devel >= 5.1
52583efa 68BuildRequires: python-devel
fea1e605 69BuildRequires: rpm-pythonprov
a1c57a8e 70BuildRequires: slang-devel
fea1e605 71BuildRequires: xmlto
a8b28c3a
ER
72%if %{with gtk}
73BuildRequires: gtk+2-devel >= 2.0
a8b28c3a 74%endif
fea1e605 75%endif
0a891de9
JB
76%if %{with usbip}
77BuildRequires: autoconf >= 2.59
78BuildRequires: automake >= 1:1.9
79BuildRequires: gcc >= 6:4.0
80BuildRequires: libtool >= 2:2
81BuildRequires: libwrap-devel
82BuildRequires: udev-devel
83%endif
49fba13a
ER
84BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85
eb373af4
AM
86# otherwise /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
87%define _enable_debug_packages 0
88
60972f76
ER
89%define makeopts CC="%{__cc}" %{?with_verbose:V=1}
90
49fba13a 91%description
bd620db3
JB
92This package contains the software from tools/ subdirectory from Linux
93kernel source and the supporting documentation.
94
95%description -l pl.UTF-8
96Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
97Linuksa oraz związaną z nim dokumentację.
49fba13a 98
4bc5704a
JK
99%package cpupower
100Summary: cpupower - Shows and sets processor power related values
bd620db3 101Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
4bc5704a 102Group: Applications/System
f57fcd71 103Requires(post,preun,postun): systemd-units >= 38
91fd1f55 104Requires: %{name}-cpupower-libs = %{version}-%{release}
f57fcd71 105Requires: systemd-units >= 0.38
2bd21e06 106Provides: cpupowerutils = 1:009-0.6.p1
2bd21e06
ER
107Obsoletes: cpupowerutils < 1:009-0.6.p1
108Obsoletes: cpuspeed < 1:1.5-16
4bc5704a
JK
109
110%description cpupower
60972f76
ER
111cpupower is a collection of tools to examine and tune power saving
112related features of your processor.
4bc5704a 113
bd620db3
JB
114%description cpupower -l pl.UTF-8
115cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
116związanych z oszczędzaniem energii.
117
4bc5704a 118%package cpupower-libs
bd620db3
JB
119Summary: cpupower library
120Summary(pl.UTF-8): Biblioteka cpupower
49fba13a
ER
121Group: Libraries
122
4bc5704a 123%description cpupower-libs
bd620db3
JB
124cpupower library.
125
126%description cpupower-libs -l pl.UTF-8
127Biblioteka cpupower.
49fba13a 128
4bc5704a 129%package cpupower-libs-devel
bd620db3
JB
130Summary: Development files for the cpupower library
131Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
49fba13a 132Group: Development/Libraries
178c4b31 133Requires: %{name}-cpupower-libs = %{version}-%{release}
49fba13a 134Provides: cpupowerutils-devel = 1:009-0.6.p1
49fba13a 135Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
08be99c5 136Conflicts: cpufrequtils-devel
49fba13a 137
4bc5704a 138%description cpupower-libs-devel
bd620db3
JB
139Development files for the cpupower library.
140
141%description cpupower-libs-devel -l pl.UTF-8
142Pliki programistyczne biblioteki cpupower.
49fba13a 143
0a891de9
JB
144%package hv
145Summary: Hyper-V virtualization tools
146Summary(pl.UTF-8): Narzędzia do wirtualizacji Hyper-V
147Group: Applications/System
148
149%description hv
150Hyper-V virtualization tools.
151
152%description hv -l pl.UTF-8
153Narzędzia do wirtualizacji Hyper-V.
154
ae4c1fd4
JB
155%package perf
156Summary: perf profiler tool
157Summary(pl.UTF-8): Narzędzie profilujące perf
fea1e605 158Group: Applications/System
9efc8fed 159Suggests: binutils
ae4c1fd4
JB
160Obsoletes: perf-core
161Obsoletes: perf-slang
fea1e605 162
ae4c1fd4 163%description perf
fea1e605
ER
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
ae4c1fd4 169This package contains core files, scripts and text interface (TUI).
db5f9ac9 170
ae4c1fd4 171%description perf -l pl.UTF-8
db5f9ac9
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
ae4c1fd4
JB
178Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
179(TUI).
db5f9ac9 180
0a3bb9dd 181%package perf-vdso32
dda20c35
JB
182Summary: perf profiler tool - VDSO 32-bit ABI reader
183Summary(pl.UTF-8): Narzędzie profilujące perf - odczyt VDSO dla ABI 32-bitowego
0a3bb9dd
JR
184Group: Applications/System
185Requires: %{name}-perf = %{version}-%{release}
186
187%description perf-vdso32
188Perf is a profiler tool for Linux 2.6+ based systems that abstracts
189away CPU hardware differences in Linux performance measurements and
190presents a simple commandline interface. Perf is based on the
191perf_events interface exported by recent versions of the Linux kernel.
192
193This package contains perf-read-vdso32 tool for reading the 32-bit
194compatibility VDSO in 64-bit mode.
195
dda20c35
JB
196%description perf-vdso32 -l pl.UTF-8
197Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
198odseparowujące od różnic sprzętowych między pomiarami wydajności w
199zależności od procesora oraz udostępniające prosty interfejs linii
200poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
201przez nowe wersje jądra Linuksa.
202
203Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
204binariów 32-bitowych w trybie 64-bitowym.
205
0a3bb9dd 206%package perf-vdsox32
dda20c35
JB
207Summary: perf profiler tool - VDSO x32 ABI reader
208Summary(pl.UTF-8): Narzędzie profilujące perf - odczyt VDSO dla ABI x32
0a3bb9dd
JR
209Group: Applications/System
210Requires: %{name}-perf = %{version}-%{release}
211
212%description perf-vdsox32
213Perf is a profiler tool for Linux 2.6+ based systems that abstracts
214away CPU hardware differences in Linux performance measurements and
215presents a simple commandline interface. Perf is based on the
216perf_events interface exported by recent versions of the Linux kernel.
217
218This package contains perf-read-vdso32 tool for reading the x32 mode
21932-bit compatibility VDSO in 64-bit mode.
220
dda20c35
JB
221%description perf-vdsox32 -l pl.UTF-8
222Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
223odseparowujące od różnic sprzętowych między pomiarami wydajności w
224zależności od procesora oraz udostępniające prosty interfejs linii
225poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
226przez nowe wersje jądra Linuksa.
227
228Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
229binariów ABI x32 w trybie 64-bitowym.
230
db5f9ac9 231%package perf-gtk
ae4c1fd4
JB
232Summary: perf profiler tool (GTK+ 2 GUI)
233Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
db5f9ac9 234Group: X11/Applications
dad8cd2d 235Requires: %{name}-perf = %{version}-%{release}
db5f9ac9
JB
236
237%description perf-gtk
238Perf is a profiler tool for Linux 2.6+ based systems that abstracts
239away CPU hardware differences in Linux performance measurements and
240presents a simple commandline interface. Perf is based on the
241perf_events interface exported by recent versions of the Linux kernel.
242
ae4c1fd4 243This package contains GTK+ 2 based GUI.
db5f9ac9
JB
244
245%description perf-gtk -l pl.UTF-8
246Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
247odseparowujące od różnic sprzętowych między pomiarami wydajności w
248zależności od procesora oraz udostępniające prosty interfejs linii
249poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
250przez nowe wersje jądra Linuksa.
251
ae4c1fd4 252Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
db5f9ac9 253
db5f9ac9
JB
254%package -n bash-completion-perf
255Summary: Bash completion for perf command
256Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
257Group: Applications/Shells
c5a822e3 258Requires: %{name}-perf = %{version}-%{release}
db5f9ac9 259Requires: bash-completion
741b96de
ER
260%if "%{_rpmversion}" >= "5"
261BuildArch: noarch
262%endif
db5f9ac9
JB
263
264%description -n bash-completion-perf
265Bash completion for perf command.
266
267%description -n bash-completion-perf -l pl.UTF-8
268Bashowe uzupełnianie parametrów dla polecenia perf.
269
c5a822e3
JB
270%package -n bash-completion-kernel-tools
271Summary: Bash completion for kernel-tools commands
272Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla poleceń kernel-tools
273Group: Applications/Shells
274Requires: %{name} = %{version}-%{release}
275Requires: bash-completion >= 2.0
276%if "%{_rpmversion}" >= "5"
277BuildArch: noarch
278%endif
279
280%description -n bash-completion-kernel-tools
281Bash completion for kernel-tools commands (currently bpftool).
282
283%description -n bash-completion-kernel-tools -l pl.UTF-8
284Bashowe uzupełnianie parametrów dla poleceń kernel-tools (obecnie
285bpftool).
286
0a891de9
JB
287%package -n usbip
288Summary: USB device sharing system over IP network
289Summary(pl.UTF-8): System współdzielenia urządzeń USB po sieci IP
290Group: Networking/Utilities
291Requires: usbip-libs = %{version}-%{release}
292# /lib/hwdata/usb.ids (note: only uncompressed file supported)
293Requires: hwdata >= 0.243-2
294
295%description -n usbip
296The USB/IP Project aims to develop a general USB device sharing system
297over IP network. To share USB devices between computers with their
298full functionality, USB/IP encapsulates "USB requests" into IP packets
299and transmits them between computers. Original USB device drivers and
300applications can be also used for remote USB devices without any
301modification of them. A computer can use remote USB devices as if they
302were directly attached; for example, we can:
303 - USB storage devices: fdisk, mkfs, mount/umount, file operations,
304 play a DVD movie and record a DVD-R media.
305 - USB keyboards and USB mice: use with Linux console and X Window
306 System.
307 - USB webcams and USB speakers: view webcam, capture image data and
308 play some music.
309 - USB printers, USB scanners, USB serial converters and USB Ethernet
310 interfaces: ok, use fine.
311
312%description -n usbip -l pl.UTF-8
313Projekt USB/IP ma na celu stworzenie ogólnego systemu współdzielenia
314urządzeń USB po sieci IP. W celu współdzielenia urządzeń USB między
315komputerami z zachowaniem pełnej funkcjonalności, USB/IP obudowuje
316żądania SUB w pakiety IP i przesyła je między komputerami. Oryginalne
317sterowniki urządzeń USB oraz aplikacje mogą być używane bez żadnych
318modyfikacji. Komputer może wykorzystywać zdaln urządzenia USB tak,
319jakby były podłączone bezpośrednio. Przykładowe możliwości:
320 - urządzenia USB do przechowywania danych: można używać programów
321 fdisk, mkfs, mount/umount, operacji na plikach, odtwarzać filmy
322 DVD oraz nagrywać nośniki DVD-R
323 - klawiatury i myszy USB: można ich używać na linuksowej konsoli oraz
324 w systemie X Window
325 - kamery i głośniki USB: można oglądać obraz z kamery, robić zdjęcia
326 i odtwarzać muzykę
327 - drukarki, skanery, konwertery portów szeregowych oraz interfejsy
328 sieciowe USB: można ich normalnie używać
329
330%package -n usbip-libs
331Summary: USB/IP library
332Summary(pl.UTF-8): Biblioteka USB/IP
333Group: Libraries
334
335%description -n usbip-libs
336USB over IP library.
337
338%description -n usbip-libs -l pl.UTF-8
339Biblioteka USB po IP.
340
341%package -n usbip-devel
342Summary: Header files for usbip library
343Summary(pl.UTF-8): Pliki nagłówkowe biblioteki usbip
344Group: Development/Libraries
345Requires: usbip-libs = %{version}-%{release}
346
347%description -n usbip-devel
348This package contains the header files needed to develop programs
349which make use of USB/IP.
350
351%description -n usbip-devel -l pl.UTF-8
352Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
353wykorzystujących USB/IP.
354
355%package -n usbip-static
356Summary: Static usbip library
357Summary(pl.UTF-8): Statyczna biblioteka usbip
358Group: Development/Libraries
359Requires: usbip-devel = %{version}-%{release}
360
361%description -n usbip-static
362Static usbip library.
363
364%description -n usbip-static -l pl.UTF-8
365Statyczna biblioteka usbip.
366
49fba13a
ER
367%prep
368%setup -qc
369cd linux-%{basever}
370
371%if "%{postver}" != ".0"
372%patch0 -p1
373%endif
374
bedc6c43 375%patch1 -p1
32b75768 376%patch3 -p1
bedc6c43 377
0a891de9
JB
378%{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
379%{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
c5a822e3 380%{__sed} -i -e 's#libexec/perf-core#share/perf-core#g' tools/perf/Makefile.config
eb373af4 381
e76f6fde
JB
382# don't rebuild on make install
383%{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile
384
49fba13a
ER
385%build
386cd linux-%{basever}
387
b1f08c11 388# Simple Disk Sleep Monitor
2c8f0d44
JR
389%{__make} -C tools/laptop/dslm \
390 %{makeopts} \
391 EXTRA_CFLAGS="%{rpmcflags}"
b1f08c11 392
0a891de9
JB
393# tools common (used eg. by tools/vm)
394%{__make} -C tools/lib/api \
51feff82 395 %{makeopts} \
0a891de9
JB
396 EXTRA_CFLAGS="%{rpmcflags}"
397
398# lsgpio
399CFLAGS="%{rpmcflags}" \
51feff82
JB
400%{__make} -C tools/gpio -j1 \
401 %{makeopts}
0a891de9
JB
402
403# HyperV is Windows based, x86 specific
404%ifarch %{ix86} %{x8664} x32
405%{__make} -C tools/hv \
406 CC="%{__cc}" \
407 OPTFLAGS="%{rpmcflags}"
408%endif
409
410CFLAGS="%{rpmcflags}" \
d4e17d6f 411%{__make} -C tools/iio -j1 \
e76f6fde
JB
412 CC="%{__cc}" \
413 %{?with_verbose:V=1}
0a891de9
JB
414
415%{__make} -C tools/laptop/freefall \
416 CC="%{__cc}" \
417 CFLAGS="%{rpmcflags}"
418
ffa90917
JB
419# make bpftool first, top-level bpf CFLAGS cause includes conflict
420CFLAGS="%{rpmcflags}" \
421%{__make} -C tools/bpf/bpftool \
422 CC="%{__cc}" \
423 %{?with_verbose:V=1}
424
0a891de9 425CFLAGS="%{rpmcflags}" \
c5a822e3 426%{__make} -C tools/bpf \
e76f6fde
JB
427 CC="%{__cc}" \
428 EXTRA_CFLAGS="%{rpmcflags}" \
429 %{?with_verbose:V=1}
0a891de9
JB
430
431# perf
432%if %{with perf}
433%{__make} -C tools/perf all man \
434%ifarch %{x8664}
435 IS_X86_64=1 \
436 %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
437%endif
438 %{!?with_gtk:NO_GTK2=1} \
439 %{!?with_libunwind:NO_LIBUNWIND=1} \
440 %{makeopts} \
441 CFLAGS_OPTIMIZE="%{rpmcflags}" \
442 WERROR=0 \
443 prefix=%{_prefix} \
444 perfexecdir=%{_datadir}/perf-core \
445 lib=%{_lib} \
446 template_dir=%{_datadir}/perf-core/templates
447%endif
448
49fba13a 449# cpupower
0a891de9 450%if %{with cpupower}
49fba13a 451%{__make} -C tools/power/cpupower \
60972f76 452 %{makeopts} \
fb1ff9fc
JB
453 CPUFREQ_BENCH=false \
454 OPTIMIZATION="%{rpmcflags}" \
455 STRIPCMD=true
49fba13a 456
bedc6c43 457%ifarch %{ix86} x32
49fba13a 458%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
fb1ff9fc
JB
459 CC="%{__cc}" \
460 CFLAGS="%{rpmcflags}"
49fba13a
ER
461%endif
462
bedc6c43 463%ifarch %{x8664} x32
49fba13a 464%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
fb1ff9fc
JB
465 CC="%{__cc}" \
466 CFLAGS="%{rpmcflags}"
49fba13a 467%endif
0a891de9 468%endif
49fba13a 469
bedc6c43 470%ifarch %{ix86} %{x8664} x32
ea7d139b 471CFLAGS="%{rpmcflags}" \
49fba13a 472%{__make} -C tools/power/x86/x86_energy_perf_policy \
ea7d139b
JR
473 CC="%{__cc}"
474
4b352448 475CFLAGS="%{rpmcflags}" \
49fba13a 476%{__make} -C tools/power/x86/turbostat \
4b352448 477 CC="%{__cc}"
49fba13a
ER
478%endif
479
0a891de9 480%{__make} -C tools/thermal/tmon \
dbaf19f8 481 CC="%{__cc}" \
0a891de9
JB
482 OPTFLAGS="%{rpmcflags}"
483
484# usbip-utils
485%if %{with usbip}
486cd tools/usb/usbip
487%{__libtoolize}
488%{__aclocal}
489%{__autoconf}
490%{__autoheader}
491%{__automake}
492%configure \
493 --disable-silent-rules \
494 --with-usbids-dir=/lib/hwdata
495%{__make}
496cd ../../..
497%endif
dbaf19f8 498
f111fe43
JK
499# page-types, slabinfo
500%{__make} -C tools/vm page-types slabinfo \
701b458f 501 CC="%{__cc}" \
f111fe43 502 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
701b458f 503
dd28be58
JK
504# gen_init_cpio
505%{__make} -C usr gen_init_cpio \
60972f76 506 %{makeopts} \
fb1ff9fc 507 CFLAGS="%{rpmcflags}"
dd28be58 508
49fba13a
ER
509%install
510rm -rf $RPM_BUILD_ROOT
b1f08c11 511
49fba13a
ER
512cd linux-%{basever}
513
0a891de9 514%if %{with cpupower}
bd620db3 515%{__make} -C tools/power/cpupower install \
49fba13a
ER
516 DESTDIR=$RPM_BUILD_ROOT \
517 libdir=%{_libdir} \
518 mandir=%{_mandir} \
519 CPUFREQ_BENCH=false
520
521%find_lang cpupower
522mv cpupower.lang ..
523
f57fcd71
ER
524install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
525cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
526cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
527
bedc6c43 528%ifarch %{ix86} x32
701b458f 529install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a 530%endif
bedc6c43 531%ifarch %{x8664} x32
701b458f 532install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a 533%endif
49fba13a 534%endif
fea1e605
ER
535
536%if %{with perf}
a5af5310 537%{__make} -C tools/perf -j1 install install-man \
4dfb9dde
JR
538%ifarch %{x8664}
539 IS_X86_64=1 \
a5af5310 540 %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
4dfb9dde 541%endif
ae4c1fd4 542 %{!?with_gtk:NO_GTK2=1} \
5a8bbd03 543 %{!?with_libunwind:NO_LIBUNWIND=1} \
fea1e605 544 CC="%{__cc}" \
fb1ff9fc 545 CFLAGS_OPTIMIZE="%{rpmcflags}" \
6e9d46c8 546 WERROR=0 \
fea1e605
ER
547 %{?with_verbose:V=1} \
548 prefix=%{_prefix} \
549 perfexecdir=%{_datadir}/perf-core \
550 template_dir=%{_datadir}/perf-core/templates \
4f4642fc 551 lib=%{_lib} \
fea1e605 552 DESTDIR=$RPM_BUILD_ROOT
db5f9ac9
JB
553
554%py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
555%py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
a8b28c3a 556
4b352448 557%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
49fba13a
ER
558%endif
559
0a891de9
JB
560%if %{with usbip}
561%{__make} -C tools/usb/usbip install \
562 DESTDIR=$RPM_BUILD_ROOT
563
564%{__rm} $RPM_BUILD_ROOT%{_libdir}/libusbip.la
565%endif
566
567install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8}
568
2c8f0d44 569install -p tools/laptop/dslm/dslm $RPM_BUILD_ROOT%{_sbindir}
0a891de9
JB
570
571install -p tools/gpio/lsgpio $RPM_BUILD_ROOT%{_bindir}
572
573%ifarch %{ix86} %{x8664} x32
574install -p tools/hv/hv_{fcopy,kvp,vss}_daemon $RPM_BUILD_ROOT%{_sbindir}
575# TODO: PLD-specific hv_get_dhcp_info,hv_get_dns_info,hv_set_ifconfig
576%{__sed} -e '1s,/usr/bin/env python,%{__python},' tools/hv/lsvmbus >$RPM_BUILD_ROOT%{_bindir}/lsvmbus
577chmod 755 $RPM_BUILD_ROOT%{_bindir}/lsvmbus
578%endif
579
51feff82 580install -p tools/iio/{iio_event_monitor,iio_generic_buffer,lsiio} $RPM_BUILD_ROOT%{_bindir}
0a891de9
JB
581
582install -p tools/laptop/freefall/freefall $RPM_BUILD_ROOT%{_sbindir}
583
c5a822e3
JB
584%{__make} -C tools/bpf install \
585 prefix=$RPM_BUILD_ROOT%{_prefix} \
e76f6fde
JB
586 bash_compdir=$RPM_BUILD_ROOT%{bash_compdir} \
587 %{?with_verbose:V=1}
c5a822e3 588%{__make} -C tools/bpf/bpftool doc-install \
e76f6fde
JB
589 prefix=$RPM_BUILD_ROOT%{_prefix} \
590 mandir=$RPM_BUILD_ROOT%{_mandir} \
591 %{?with_verbose:V=1}
0a891de9
JB
592
593install -p tools/thermal/tmon/tmon $RPM_BUILD_ROOT%{_bindir}
594cp -p tools/thermal/tmon/tmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
595
596install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
597install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
598
599%ifarch %{ix86} %{x8664} x32
600install -d $RPM_BUILD_ROOT%{_mandir}/man8
601%{__make} -C tools/power/x86/x86_energy_perf_policy install \
602 DESTDIR=$RPM_BUILD_ROOT
603
604%{__make} -C tools/power/x86/turbostat install \
605 DESTDIR=$RPM_BUILD_ROOT
606%endif
607
dd28be58 608# gen_init_cpio
60972f76 609install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
dd28be58 610
49fba13a
ER
611%clean
612rm -rf $RPM_BUILD_ROOT
613
4bc5704a
JK
614%post cpupower-libs -p /sbin/ldconfig
615%postun cpupower-libs -p /sbin/ldconfig
49fba13a 616
f57fcd71
ER
617%post cpupower
618%systemd_post cpupower.service
619
620%preun cpupower
621%systemd_preun cpupower.service
622
623%postun cpupower
624%systemd_reload
625
0a891de9
JB
626%post -n usbip-libs -p /sbin/ldconfig
627%postun -n usbip-libs -p /sbin/ldconfig
628
4bc5704a 629%files
49fba13a 630%defattr(644,root,root,755)
0a891de9
JB
631%attr(755,root,root) %{_bindir}/bpf_asm
632%attr(755,root,root) %{_bindir}/bpf_dbg
633%attr(755,root,root) %{_bindir}/bpf_jit_disasm
701b458f 634%attr(755,root,root) %{_bindir}/gen_init_cpio
0a891de9
JB
635%attr(755,root,root) %{_bindir}/iio_event_monitor
636%attr(755,root,root) %{_bindir}/iio_generic_buffer
0a891de9
JB
637%attr(755,root,root) %{_bindir}/lsgpio
638%attr(755,root,root) %{_bindir}/lsiio
701b458f 639%attr(755,root,root) %{_bindir}/slabinfo
0a891de9 640%attr(755,root,root) %{_bindir}/tmon
c5a822e3 641%attr(755,root,root) %{_sbindir}/bpftool
b1f08c11 642%attr(755,root,root) %{_sbindir}/dslm
0a891de9 643%attr(755,root,root) %{_sbindir}/freefall
f111fe43 644%attr(755,root,root) %{_sbindir}/page-types
c5a822e3 645%{_mandir}/man8/bpftool*.8*
0a891de9 646%{_mandir}/man8/tmon.8*
bedc6c43 647%ifarch %{ix86} %{x8664} x32
49fba13a
ER
648%attr(755,root,root) %{_bindir}/centrino-decode
649%attr(755,root,root) %{_bindir}/powernow-k8-decode
650%endif
bedc6c43 651%ifarch %{ix86} %{x8664} x32
49fba13a
ER
652%attr(755,root,root) %{_bindir}/turbostat
653%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
bd620db3
JB
654%{_mandir}/man8/turbostat.8*
655%{_mandir}/man8/x86_energy_perf_policy.8*
49fba13a
ER
656%endif
657
4bc5704a
JK
658%files cpupower -f cpupower.lang
659%defattr(644,root,root,755)
660%attr(755,root,root) %{_bindir}/cpupower
bd620db3 661%{_mandir}/man1/cpupower*.1*
f57fcd71
ER
662%{systemdunitdir}/cpupower.service
663%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
4bc5704a
JK
664
665%files cpupower-libs
49fba13a
ER
666%defattr(644,root,root,755)
667%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
bd620db3 668%attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
49fba13a 669
4bc5704a 670%files cpupower-libs-devel
49fba13a 671%defattr(644,root,root,755)
bd620db3 672%attr(755,root,root) %{_libdir}/libcpupower.so
49fba13a 673%{_includedir}/cpufreq.h
dbaf19f8 674%{_includedir}/cpuidle.h
fea1e605 675
0a891de9
JB
676%ifarch %{ix86} %{x8664} x32
677%files hv
678%defattr(644,root,root,755)
679# TODO: PLDify these scripts and move to bindir
680%doc linux-%{basever}/tools/hv/hv_{get_dhcp_info,get_dns_info,set_ifconfig}.sh
681%attr(755,root,root) %{_bindir}/lsvmbus
682%attr(755,root,root) %{_sbindir}/hv_fcopy_daemon
683%attr(755,root,root) %{_sbindir}/hv_kvp_daemon
684%attr(755,root,root) %{_sbindir}/hv_vss_daemon
685%endif
686
fea1e605 687%if %{with perf}
ae4c1fd4 688%files perf
fea1e605 689%defattr(644,root,root,755)
35be6466 690%attr(755,root,root) %{_bindir}/perf
ae4c1fd4 691%attr(755,root,root) %{_bindir}/trace
fea1e605 692%{_mandir}/man1/perf*.1*
c5a822e3 693%{_docdir}/perf-tip
fea1e605
ER
694%dir %{_datadir}/perf-core
695%attr(755,root,root) %{_datadir}/perf-core/perf-archive
4f4642fc 696%attr(755,root,root) %{_datadir}/perf-core/perf-with-kcore
c5a822e3 697%{_datadir}/perf-core/strace
fea1e605
ER
698
699%dir %{_datadir}/perf-core/scripts
700
701%dir %{_datadir}/perf-core/scripts/perl
702%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
703%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
704%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
705%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
706%{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
707%dir %{_datadir}/perf-core/scripts/perl/bin
708%attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
709%{_datadir}/perf-core/scripts/perl/*.pl
710
711%dir %{_datadir}/perf-core/scripts/python
712%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
713%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
714%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
715%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
db5f9ac9 716%{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
fea1e605
ER
717%dir %{_datadir}/perf-core/scripts/python/bin
718%attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
db5f9ac9
JB
719%{_datadir}/perf-core/scripts/python/*.py*
720
eb373af4
AM
721%dir %{_libdir}/traceevent
722%dir %{_libdir}/traceevent/plugins
723%attr(755,root,root) %{_libdir}/traceevent/plugins/plugin_*.so
724
a5af5310 725%if %{with multilib}
0a3bb9dd
JR
726%files perf-vdso32
727%defattr(644,root,root,755)
728%attr(755,root,root) %{_bindir}/perf-read-vdso32
729
730%files perf-vdsox32
731%defattr(644,root,root,755)
732%attr(755,root,root) %{_bindir}/perf-read-vdsox32
733%endif
734
bc35d286 735%if %{with gtk}
db5f9ac9
JB
736%files perf-gtk
737%defattr(644,root,root,755)
ae4c1fd4 738%attr(755,root,root) %{_libdir}/libperf-gtk.so
bc35d286 739%endif
db5f9ac9 740
db5f9ac9
JB
741%files -n bash-completion-perf
742%defattr(644,root,root,755)
743/etc/bash_completion.d/perf
fea1e605 744%endif
0a891de9 745
c5a822e3
JB
746%files -n bash-completion-kernel-tools
747%defattr(644,root,root,755)
748%{bash_compdir}/bpftool
749
0a891de9
JB
750%if %{with usbip}
751%files -n usbip
752%defattr(644,root,root,755)
753%doc linux-%{basever}/tools/usb/usbip/{AUTHORS,README}
754%attr(755,root,root) %{_sbindir}/usbip
755%attr(755,root,root) %{_sbindir}/usbipd
756%{_mandir}/man8/usbip.8*
757%{_mandir}/man8/usbipd.8*
758
759%files -n usbip-libs
760%defattr(644,root,root,755)
761%attr(755,root,root) %{_libdir}/libusbip.so.*.*.*
762%attr(755,root,root) %ghost %{_libdir}/libusbip.so.0
763
764%files -n usbip-devel
765%defattr(644,root,root,755)
766%attr(755,root,root) %{_libdir}/libusbip.so
767%{_includedir}/usbip
768
769%files -n usbip-static
770%defattr(644,root,root,755)
771%{_libdir}/libusbip.a
772%endif
This page took 0.284096 seconds and 4 git commands to generate.