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