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