]> git.pld-linux.org Git - packages/kernel-tools.git/blob - kernel-tools.spec
- up to 4.19.43; bfp-helpers coliding with man-pages
[packages/kernel-tools.git] / kernel-tools.spec
1 # TODO:
2 # - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
3 # - add -n python-perf?
4 # - add bcond to disable building docs (perf docs)
5 # - install of perf links perf binary again
6
7 # Conditional build:
8 %bcond_without  verbose         # verbose build (V=1)
9 %bcond_without  cpupower        # cpupower tools
10 %bcond_without  perf            # perf tools
11 %bcond_without  gtk             # GTK+ 2.x perf support
12 %bcond_without  libunwind       # libunwind perf support
13 %bcond_without  multilib        # multilib perf support
14 %bcond_without  usbip           # usbip utils
15
16 %ifarch x32
17 %undefine       with_libunwind
18 %endif
19 %ifnarch %{x8664}
20 %undefine       with_multilib
21 %endif
22
23 %define         basever         4.19
24 %define         postver         .43
25 Summary:        Assortment of tools for the Linux kernel
26 Summary(pl.UTF-8):      Zestaw narzędzi dla jądra Linuksa
27 Name:           kernel-tools
28 Version:        %{basever}%{postver}
29 Release:        1
30 License:        GPL v2
31 Group:          Applications/System
32 Source0:        https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
33 # Source0-md5:  740a90cf810c2105df8ee12e5d0bb900
34 Source1:        cpupower.service
35 Source2:        cpupower.config
36 %if "%{postver}" != ".0"
37 Patch0:         https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
38 # Patch0-md5:   de59f616dfe3f55ee03ccb06e59481ef
39 %endif
40 Patch1:         x32.patch
41 Patch3:         %{name}-perf-update.patch
42 URL:            http://www.kernel.org/
43 BuildRequires:  bison
44 BuildRequires:  docutils
45 BuildRequires:  flex
46 BuildRequires:  gettext-tools
47 BuildRequires:  linux-libc-headers >= 7:4.12
48 BuildRequires:  ncurses-devel
49 BuildRequires:  ncurses-ext-devel
50 BuildRequires:  pciutils-devel
51 BuildRequires:  pkgconfig
52 BuildRequires:  python3
53 BuildRequires:  python3-modules
54 BuildRequires:  rpmbuild(macros) >= 1.673
55 BuildRequires:  tar >= 1:1.22
56 BuildRequires:  xz
57 %if %{with perf}
58 BuildRequires:  asciidoc
59 BuildRequires:  audit-libs-devel
60 BuildRequires:  binutils-devel >= 4:2.29
61 BuildRequires:  docbook-dtd45-xml
62 BuildRequires:  docbook-style-xsl
63 BuildRequires:  elfutils-devel
64 %if %{with multilib}
65 BuildRequires:  gcc-multilib-32
66 BuildRequires:  gcc-multilib-x32
67 %endif
68 %{?with_libunwind:BuildRequires:        libunwind-devel >= 0.99}
69 BuildRequires:  numactl-devel
70 BuildRequires:  perl-devel >= 5.1
71 BuildRequires:  python-devel
72 BuildRequires:  rpm-pythonprov
73 BuildRequires:  slang-devel
74 BuildRequires:  xmlto
75 %if %{with gtk}
76 BuildRequires:  gtk+2-devel >= 2.0
77 %endif
78 %endif
79 %if %{with usbip}
80 BuildRequires:  autoconf >= 2.59
81 BuildRequires:  automake >= 1:1.9
82 BuildRequires:  gcc >= 6:4.0
83 BuildRequires:  libtool >= 2:2
84 BuildRequires:  libwrap-devel
85 BuildRequires:  udev-devel
86 %endif
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 # otherwise /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
90 %define         _enable_debug_packages  0
91
92 %define         makeopts        CC="%{__cc}" %{?with_verbose:V=1}
93
94 %description
95 This package contains the software from tools/ subdirectory from Linux
96 kernel source and the supporting documentation.
97
98 %description -l pl.UTF-8
99 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
100 Linuksa oraz związaną z nim dokumentację.
101
102 %package cpupower
103 Summary:        cpupower - Shows and sets processor power related values
104 Summary(pl.UTF-8):      cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
105 Group:          Applications/System
106 Requires(post,preun,postun):    systemd-units >= 38
107 Requires:       %{name}-cpupower-libs = %{version}-%{release}
108 Requires:       systemd-units >= 0.38
109 Provides:       cpupowerutils = 1:009-0.6.p1
110 Obsoletes:      cpupowerutils < 1:009-0.6.p1
111 Obsoletes:      cpuspeed < 1:1.5-16
112
113 %description cpupower
114 cpupower is a collection of tools to examine and tune power saving
115 related features of your processor.
116
117 %description cpupower -l pl.UTF-8
118 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
119 związanych z oszczędzaniem energii.
120
121 %package cpupower-libs
122 Summary:        cpupower library
123 Summary(pl.UTF-8):      Biblioteka cpupower
124 Group:          Libraries
125
126 %description cpupower-libs
127 cpupower library.
128
129 %description cpupower-libs -l pl.UTF-8
130 Biblioteka cpupower.
131
132 %package cpupower-libs-devel
133 Summary:        Development files for the cpupower library
134 Summary(pl.UTF-8):      Pliki programistyczne biblioteki cpupower
135 Group:          Development/Libraries
136 Requires:       %{name}-cpupower-libs = %{version}-%{release}
137 Provides:       cpupowerutils-devel = 1:009-0.6.p1
138 Obsoletes:      cpupowerutils-devel < 1:009-0.6.p1
139 Conflicts:      cpufrequtils-devel
140
141 %description cpupower-libs-devel
142 Development files for the cpupower library.
143
144 %description cpupower-libs-devel -l pl.UTF-8
145 Pliki programistyczne biblioteki cpupower.
146
147 %package hv
148 Summary:        Hyper-V virtualization tools
149 Summary(pl.UTF-8):      Narzędzia do wirtualizacji Hyper-V
150 Group:          Applications/System
151
152 %description hv
153 Hyper-V virtualization tools.
154
155 %description hv -l pl.UTF-8
156 Narzędzia do wirtualizacji Hyper-V.
157
158 %package perf
159 Summary:        perf profiler tool
160 Summary(pl.UTF-8):      Narzędzie profilujące perf
161 Group:          Applications/System
162 Suggests:       binutils
163 Obsoletes:      perf-core
164 Obsoletes:      perf-slang
165
166 %description perf
167 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
168 away CPU hardware differences in Linux performance measurements and
169 presents a simple commandline interface. Perf is based on the
170 perf_events interface exported by recent versions of the Linux kernel.
171
172 This package contains core files, scripts and text interface (TUI).
173
174 %description perf -l pl.UTF-8
175 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
176 odseparowujące od różnic sprzętowych między pomiarami wydajności w
177 zależności od procesora oraz udostępniające prosty interfejs linii
178 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
179 przez nowe wersje jądra Linuksa.
180
181 Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
182 (TUI).
183
184 %package perf-vdso32
185 Summary:        perf profiler tool - VDSO 32-bit ABI reader
186 Summary(pl.UTF-8):      Narzędzie profilujące perf - odczyt VDSO dla ABI 32-bitowego
187 Group:          Applications/System
188 Requires:       %{name}-perf = %{version}-%{release}
189
190 %description perf-vdso32
191 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
192 away CPU hardware differences in Linux performance measurements and
193 presents a simple commandline interface. Perf is based on the
194 perf_events interface exported by recent versions of the Linux kernel.
195
196 This package contains perf-read-vdso32 tool for reading the 32-bit
197 compatibility VDSO in 64-bit mode.
198
199 %description perf-vdso32 -l pl.UTF-8
200 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
201 odseparowujące od różnic sprzętowych między pomiarami wydajności w
202 zależności od procesora oraz udostępniające prosty interfejs linii
203 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
204 przez nowe wersje jądra Linuksa.
205
206 Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
207 binariów 32-bitowych w trybie 64-bitowym.
208
209 %package perf-vdsox32
210 Summary:        perf profiler tool - VDSO x32 ABI reader
211 Summary(pl.UTF-8):      Narzędzie profilujące perf - odczyt VDSO dla ABI x32
212 Group:          Applications/System
213 Requires:       %{name}-perf = %{version}-%{release}
214
215 %description perf-vdsox32
216 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
217 away CPU hardware differences in Linux performance measurements and
218 presents a simple commandline interface. Perf is based on the
219 perf_events interface exported by recent versions of the Linux kernel.
220
221 This package contains perf-read-vdso32 tool for reading the x32 mode
222 32-bit compatibility VDSO in 64-bit mode.
223
224 %description perf-vdsox32 -l pl.UTF-8
225 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
226 odseparowujące od różnic sprzętowych między pomiarami wydajności w
227 zależności od procesora oraz udostępniające prosty interfejs linii
228 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
229 przez nowe wersje jądra Linuksa.
230
231 Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
232 binariów ABI x32 w trybie 64-bitowym.
233
234 %package perf-gtk
235 Summary:        perf profiler tool (GTK+ 2 GUI)
236 Summary(pl.UTF-8):      Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
237 Group:          X11/Applications
238 Requires:       %{name}-perf = %{version}-%{release}
239
240 %description perf-gtk
241 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
242 away CPU hardware differences in Linux performance measurements and
243 presents a simple commandline interface. Perf is based on the
244 perf_events interface exported by recent versions of the Linux kernel.
245
246 This package contains GTK+ 2 based GUI.
247
248 %description perf-gtk -l pl.UTF-8
249 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
250 odseparowujące od różnic sprzętowych między pomiarami wydajności w
251 zależności od procesora oraz udostępniające prosty interfejs linii
252 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
253 przez nowe wersje jądra Linuksa.
254
255 Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
256
257 %package -n bash-completion-perf
258 Summary:        Bash completion for perf command
259 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla polecenia perf
260 Group:          Applications/Shells
261 Requires:       %{name}-perf = %{version}-%{release}
262 Requires:       bash-completion
263 %if "%{_rpmversion}" >= "5"
264 BuildArch:      noarch
265 %endif
266
267 %description -n bash-completion-perf
268 Bash completion for perf command.
269
270 %description -n bash-completion-perf -l pl.UTF-8
271 Bashowe uzupełnianie parametrów dla polecenia perf.
272
273 %package -n bash-completion-kernel-tools
274 Summary:        Bash completion for kernel-tools commands
275 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń kernel-tools
276 Group:          Applications/Shells
277 Requires:       %{name} = %{version}-%{release}
278 Requires:       bash-completion >= 2.0
279 %if "%{_rpmversion}" >= "5"
280 BuildArch:      noarch
281 %endif
282
283 %description -n bash-completion-kernel-tools
284 Bash completion for kernel-tools commands (currently bpftool).
285
286 %description -n bash-completion-kernel-tools -l pl.UTF-8
287 Bashowe uzupełnianie parametrów dla poleceń kernel-tools (obecnie
288 bpftool).
289
290 %package -n usbip
291 Summary:        USB device sharing system over IP network
292 Summary(pl.UTF-8):      System współdzielenia urządzeń USB po sieci IP
293 Group:          Networking/Utilities
294 Requires:       usbip-libs = %{version}-%{release}
295 # /lib/hwdata/usb.ids (note: only uncompressed file supported)
296 Requires:       hwdata >= 0.243-2
297
298 %description -n usbip
299 The USB/IP Project aims to develop a general USB device sharing system
300 over IP network. To share USB devices between computers with their
301 full functionality, USB/IP encapsulates "USB requests" into IP packets
302 and transmits them between computers. Original USB device drivers and
303 applications can be also used for remote USB devices without any
304 modification of them. A computer can use remote USB devices as if they
305 were 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
316 Projekt USB/IP ma na celu stworzenie ogólnego systemu współdzielenia
317 urządzeń USB po sieci IP. W celu współdzielenia urządzeń USB między
318 komputerami z zachowaniem pełnej funkcjonalności, USB/IP obudowuje
319 żądania SUB w pakiety IP i przesyła je między komputerami. Oryginalne
320 sterowniki urządzeń USB oraz aplikacje mogą być używane bez żadnych
321 modyfikacji. Komputer może wykorzystywać zdaln urządzenia USB tak,
322 jakby 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
334 Summary:        USB/IP library
335 Summary(pl.UTF-8):      Biblioteka USB/IP
336 Group:          Libraries
337
338 %description -n usbip-libs
339 USB over IP library.
340
341 %description -n usbip-libs -l pl.UTF-8
342 Biblioteka USB po IP.
343
344 %package -n usbip-devel
345 Summary:        Header files for usbip library
346 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki usbip
347 Group:          Development/Libraries
348 Requires:       usbip-libs = %{version}-%{release}
349
350 %description -n usbip-devel
351 This package contains the header files needed to develop programs
352 which make use of USB/IP.
353
354 %description -n usbip-devel -l pl.UTF-8
355 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
356 wykorzystujących USB/IP.
357
358 %package -n usbip-static
359 Summary:        Static usbip library
360 Summary(pl.UTF-8):      Statyczna biblioteka usbip
361 Group:          Development/Libraries
362 Requires:       usbip-devel = %{version}-%{release}
363
364 %description -n usbip-static
365 Static usbip library.
366
367 %description -n usbip-static -l pl.UTF-8
368 Statyczna biblioteka usbip.
369
370 %prep
371 %setup -qc
372 cd linux-%{basever}
373
374 %if "%{postver}" != ".0"
375 %patch0 -p1
376 %endif
377
378 %patch1 -p1
379 %patch3 -p1
380
381 %{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
382 %{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
383 %{__sed} -i -e 's#libexec/perf-core#share/perf-core#g' tools/perf/Makefile.config
384
385 # don't rebuild on make install
386 %{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile
387
388 %build
389 cd linux-%{basever}
390
391 # Simple Disk Sleep Monitor
392 %{__make} -C tools/laptop/dslm \
393         %{makeopts} \
394         EXTRA_CFLAGS="%{rpmcflags}"
395
396 # tools common (used eg. by tools/vm)
397 %{__make} -C tools/lib/api \
398         %{makeopts} \
399         EXTRA_CFLAGS="%{rpmcflags}"
400
401 # lsgpio
402 CFLAGS="%{rpmcflags}" \
403 %{__make} -C tools/gpio -j1 \
404         %{makeopts}
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
413 CFLAGS="%{rpmcflags}" \
414 %{__make} -C tools/iio -j1 \
415         CC="%{__cc}" \
416         %{?with_verbose:V=1}
417
418 %{__make} -C tools/laptop/freefall \
419         CC="%{__cc}" \
420         CFLAGS="%{rpmcflags}"
421
422 # make bpftool first, top-level bpf CFLAGS cause includes conflict
423 CFLAGS="%{rpmcflags}" \
424 %{__make} -C tools/bpf/bpftool \
425         CC="%{__cc}" \
426         %{?with_verbose:V=1}
427
428 CFLAGS="%{rpmcflags}" \
429 %{__make} -C tools/bpf \
430         CC="%{__cc}" \
431         EXTRA_CFLAGS="%{rpmcflags}" \
432         %{?with_verbose:V=1}
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
452 # cpupower
453 %if %{with cpupower}
454 %{__make} -C tools/power/cpupower \
455         %{makeopts} \
456         CPUFREQ_BENCH=false \
457         OPTIMIZATION="%{rpmcflags}" \
458         STRIPCMD=true
459
460 %ifarch %{ix86} x32
461 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
462         CC="%{__cc}" \
463         CFLAGS="%{rpmcflags}"
464 %endif
465
466 %ifarch %{x8664} x32
467 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
468         CC="%{__cc}" \
469         CFLAGS="%{rpmcflags}"
470 %endif
471 %endif
472
473 %ifarch %{ix86} %{x8664} x32
474 CFLAGS="%{rpmcflags}" \
475 %{__make} -C tools/power/x86/x86_energy_perf_policy \
476         CC="%{__cc}"
477
478 CFLAGS="%{rpmcflags}" \
479 %{__make} -C tools/power/x86/turbostat \
480         CC="%{__cc}"
481 %endif
482
483 %{__make} -C tools/thermal/tmon \
484         CC="%{__cc}" \
485         OPTFLAGS="%{rpmcflags}"
486
487 # usbip-utils
488 %if %{with usbip}
489 cd 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}
499 cd ../../..
500 %endif
501
502 # page-types, slabinfo
503 %{__make} -C tools/vm page-types slabinfo \
504         CC="%{__cc}" \
505         CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
506
507 # gen_init_cpio
508 %{__make} -C usr gen_init_cpio \
509         %{makeopts} \
510         CFLAGS="%{rpmcflags}"
511
512 %install
513 rm -rf $RPM_BUILD_ROOT
514
515 cd linux-%{basever}
516
517 %if %{with cpupower}
518 %{__make} -C tools/power/cpupower install \
519         DESTDIR=$RPM_BUILD_ROOT \
520         libdir=%{_libdir} \
521         mandir=%{_mandir} \
522         CPUFREQ_BENCH=false
523
524 %find_lang cpupower
525 mv cpupower.lang ..
526
527 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
528 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
529 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
530
531 %ifarch %{ix86} x32
532 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
533 %endif
534 %ifarch %{x8664} x32
535 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
536 %endif
537 %endif
538
539 %if %{with perf}
540 %{__make} -C tools/perf -j1 install install-man \
541 %ifarch %{x8664}
542         IS_X86_64=1 \
543         %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
544 %endif
545         %{!?with_gtk:NO_GTK2=1} \
546         %{!?with_libunwind:NO_LIBUNWIND=1} \
547         CC="%{__cc}" \
548         CFLAGS_OPTIMIZE="%{rpmcflags}" \
549         WERROR=0 \
550         %{?with_verbose:V=1} \
551         prefix=%{_prefix} \
552         perfexecdir=%{_datadir}/perf-core \
553         template_dir=%{_datadir}/perf-core/templates \
554         lib=%{_lib} \
555         DESTDIR=$RPM_BUILD_ROOT
556
557 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
558 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
559
560 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
561 %endif
562
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
570 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8}
571
572 install -p tools/laptop/dslm/dslm $RPM_BUILD_ROOT%{_sbindir}
573
574 install -p tools/gpio/lsgpio $RPM_BUILD_ROOT%{_bindir}
575
576 %ifarch %{ix86} %{x8664} x32
577 install -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
580 chmod 755 $RPM_BUILD_ROOT%{_bindir}/lsvmbus
581 %endif
582
583 install -p tools/iio/{iio_event_monitor,iio_generic_buffer,lsiio} $RPM_BUILD_ROOT%{_bindir}
584
585 install -p tools/laptop/freefall/freefall $RPM_BUILD_ROOT%{_sbindir}
586
587 %{__make} -C tools/bpf install \
588         prefix=$RPM_BUILD_ROOT%{_prefix} \
589         bash_compdir=$RPM_BUILD_ROOT%{bash_compdir} \
590         %{?with_verbose:V=1}
591 %{__make} -C tools/bpf/bpftool doc-install \
592         prefix=$RPM_BUILD_ROOT%{_prefix} \
593         mandir=$RPM_BUILD_ROOT%{_mandir} \
594         %{?with_verbose:V=1}
595
596 install -p tools/thermal/tmon/tmon $RPM_BUILD_ROOT%{_bindir}
597 cp -p tools/thermal/tmon/tmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
598
599 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
600 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
601
602 %ifarch %{ix86} %{x8664} x32
603 install -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
611 # gen_init_cpio
612 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
613
614 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/bpf-helpers.7*
615
616 %clean
617 rm -rf $RPM_BUILD_ROOT
618
619 %post   cpupower-libs -p /sbin/ldconfig
620 %postun cpupower-libs -p /sbin/ldconfig
621
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
631 %post   -n usbip-libs -p /sbin/ldconfig
632 %postun -n usbip-libs -p /sbin/ldconfig
633
634 %files
635 %defattr(644,root,root,755)
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
639 %attr(755,root,root) %{_bindir}/gen_init_cpio
640 %attr(755,root,root) %{_bindir}/iio_event_monitor
641 %attr(755,root,root) %{_bindir}/iio_generic_buffer
642 %attr(755,root,root) %{_bindir}/lsgpio
643 %attr(755,root,root) %{_bindir}/lsiio
644 %attr(755,root,root) %{_bindir}/slabinfo
645 %attr(755,root,root) %{_bindir}/tmon
646 %attr(755,root,root) %{_sbindir}/bpftool
647 %attr(755,root,root) %{_sbindir}/dslm
648 %attr(755,root,root) %{_sbindir}/freefall
649 %attr(755,root,root) %{_sbindir}/page-types
650 %{_mandir}/man8/bpftool*.8*
651 %{_mandir}/man8/tmon.8*
652 %ifarch %{ix86} %{x8664} x32
653 %attr(755,root,root) %{_bindir}/centrino-decode
654 %attr(755,root,root) %{_bindir}/powernow-k8-decode
655 %endif
656 %ifarch %{ix86} %{x8664} x32
657 %attr(755,root,root) %{_bindir}/turbostat
658 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
659 %{_mandir}/man8/turbostat.8*
660 %{_mandir}/man8/x86_energy_perf_policy.8*
661 %endif
662
663 %files cpupower -f cpupower.lang
664 %defattr(644,root,root,755)
665 %attr(755,root,root) %{_bindir}/cpupower
666 %{_mandir}/man1/cpupower*.1*
667 %{systemdunitdir}/cpupower.service
668 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
669
670 %files cpupower-libs
671 %defattr(644,root,root,755)
672 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
673 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
674
675 %files cpupower-libs-devel
676 %defattr(644,root,root,755)
677 %attr(755,root,root) %{_libdir}/libcpupower.so
678 %{_includedir}/cpufreq.h
679 %{_includedir}/cpuidle.h
680
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
692 %if %{with perf}
693 %files perf
694 %defattr(644,root,root,755)
695 %attr(755,root,root) %{_bindir}/perf
696 %attr(755,root,root) %{_bindir}/trace
697 %{_mandir}/man1/perf*.1*
698 %{_docdir}/perf-tip
699 %dir %{_datadir}/perf-core
700 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
701 %attr(755,root,root) %{_datadir}/perf-core/perf-with-kcore
702 %{_datadir}/perf-core/strace
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
721 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
722 %dir %{_datadir}/perf-core/scripts/python/bin
723 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
724 %{_datadir}/perf-core/scripts/python/*.py*
725
726 %dir %{_libdir}/traceevent
727 %dir %{_libdir}/traceevent/plugins
728 %attr(755,root,root) %{_libdir}/traceevent/plugins/plugin_*.so
729
730 %dir %{_prefix}/lib/perf
731 %{_prefix}/lib/perf/examples
732 %{_prefix}/lib/perf/include
733
734 %if %{with multilib}
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
744 %if %{with gtk}
745 %files perf-gtk
746 %defattr(644,root,root,755)
747 %attr(755,root,root) %{_libdir}/libperf-gtk.so
748 %endif
749
750 %files -n bash-completion-perf
751 %defattr(644,root,root,755)
752 /etc/bash_completion.d/perf
753 %endif
754
755 %files -n bash-completion-kernel-tools
756 %defattr(644,root,root,755)
757 %{bash_compdir}/bpftool
758
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.149647 seconds and 3 git commands to generate.