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