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