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