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