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