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