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