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