]> git.pld-linux.org Git - packages/qemu-kvm.git/blob - qemu-kvm.spec
ac8c188e0294ca7e1539cf8d3a9ac7112ab745a6
[packages/qemu-kvm.git] / qemu-kvm.spec
1 #
2 # Conditional build:
3 %bcond_without  sdl             # SDL UI and audio support
4 %bcond_without  opengl          # OpenGL support
5 %bcond_without  ceph            # Ceph/RBD support
6 %bcond_without  spice           # SPICE support
7 %bcond_with     esd             # EsounD audio support
8 %bcond_without  oss             # OSS audio support
9 %bcond_without  pulseaudio      # PulseAudio audio support
10 %bcond_without  xen             # Xen backend driver support
11 #
12 Summary:        QEMU CPU Emulator
13 Summary(pl.UTF-8):      QEMU - emulator procesora
14 Name:           qemu-kvm
15 Version:        1.2.0
16 Release:        9
17 License:        GPL v2+
18 Group:          Applications/Emulators
19 Source0:        http://downloads.sourceforge.net/kvm/%{name}-%{version}.tar.gz
20 # Source0-md5:  d7b18b673c48abfee65a9c0245df0415
21 Source1:        http://www.linuxtogo.org/~kevin/SeaBIOS/bios.bin-1.6.3
22 # Source1-md5:  9d3b8a7fbd65e5250b9d005a79ffaf34
23 Source2:        qemu.binfmt
24 # Loads kvm kernel modules at boot
25 Source3:        kvm-modules-load.conf
26 # Creates /dev/kvm
27 Source4:        80-kvm.rules
28 # KSM control scripts
29 Source5:        ksm.service
30 Source6:        ksm.sysconfig
31 Source7:        ksmctl.c
32 Source8:        ksmtuned.service
33 Source9:        ksmtuned
34 Source10:       ksmtuned.conf
35 Source11:       qemu-guest-agent.service
36 Source12:       99-qemu-guest-agent.rules
37 Patch0:         %{name}-whitelist.patch
38 Patch1:         %{name}-fixes.patch
39 Patch2:         qemu-cflags.patch
40 Patch3:         qemu-usbredir.patch
41 Patch4:         %{name}-system-libcacard.patch
42 Patch5:         %{name}-link.patch
43 URL:            http://www.linux-kvm.org/
44 %{?with_opengl:BuildRequires:   OpenGL-GLX-devel}
45 %{?with_sdl:BuildRequires:      SDL-devel >= 1.2.1}
46 BuildRequires:  alsa-lib-devel
47 BuildRequires:  bluez-libs-devel
48 BuildRequires:  brlapi-devel
49 %{?with_ceph:BuildRequires:     ceph-devel}
50 BuildRequires:  curl-devel
51 BuildRequires:  cyrus-sasl-devel >= 2
52 %{?with_esd:BuildRequires:      esound-devel}
53 BuildRequires:  glib2-devel >= 1:2.12
54 BuildRequires:  gnutls-devel
55 BuildRequires:  libaio-devel
56 BuildRequires:  libcacard-devel
57 BuildRequires:  libcap-devel
58 BuildRequires:  libcap-ng-devel
59 BuildRequires:  libfdt-devel
60 BuildRequires:  libiscsi-devel
61 BuildRequires:  libjpeg-devel
62 BuildRequires:  libpng-devel
63 BuildRequires:  libseccomp-devel
64 BuildRequires:  libuuid-devel
65 BuildRequires:  ncurses-devel
66 BuildRequires:  nss-devel >= 3.12.8
67 BuildRequires:  perl-Encode
68 BuildRequires:  perl-tools-pod
69 BuildRequires:  pkgconfig
70 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel}
71 BuildRequires:  rpmbuild(macros) >= 1.644
72 BuildRequires:  sed >= 4.0
73 %if %{with spice}
74 BuildRequires:  spice-protocol >= 0.8.0
75 BuildRequires:  spice-server-devel >= 0.8.2
76 %endif
77 BuildRequires:  texi2html
78 BuildRequires:  texinfo
79 BuildRequires:  usbredir-devel >= 0.3.4
80 BuildRequires:  vde2-devel
81 BuildRequires:  which
82 %{?with_xen:BuildRequires:      xen-devel >= 3.4}
83 BuildRequires:  xfsprogs-devel
84 BuildRequires:  xorg-lib-libX11-devel
85 BuildRequires:  zlib-devel
86 Requires:       %{name}-img = %{version}-%{release}
87 Requires:       %{name}-system-alpha = %{version}-%{release}
88 Requires:       %{name}-system-arm = %{version}-%{release}
89 Requires:       %{name}-system-cris = %{version}-%{release}
90 Requires:       %{name}-system-lm32 = %{version}-%{release}
91 Requires:       %{name}-system-m68k = %{version}-%{release}
92 Requires:       %{name}-system-microblaze = %{version}-%{release}
93 Requires:       %{name}-system-mips = %{version}-%{release}
94 Requires:       %{name}-system-ppc = %{version}-%{release}
95 Requires:       %{name}-system-or32 = %{version}-%{release}
96 Requires:       %{name}-system-s390x = %{version}-%{release}
97 Requires:       %{name}-system-sh4 = %{version}-%{release}
98 Requires:       %{name}-system-sparc = %{version}-%{release}
99 Requires:       %{name}-system-unicore32 = %{version}-%{release}
100 Requires:       %{name}-system-x86 = %{version}-%{release}
101 Requires:       %{name}-system-xtensa = %{version}-%{release}
102 Requires:       %{name}-user = %{version}-%{release}
103 Provides:       qemu = %{version}-%{release}
104 Obsoletes:      qemu
105 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
106
107 %define systempkg_req \
108 Requires:       SDL >= 1.2.1
109
110 # some PPC/SPARC boot image in ELF format
111 %define         _noautostrip    .*%{_datadir}/qemu/.*
112
113 %description
114 QEMU is a FAST! processor emulator. By using dynamic translation it
115 achieves a reasonnable speed while being easy to port on new host
116 CPUs. QEMU has two operating modes:
117
118 - User mode emulation. In this mode, QEMU can launch Linux processes
119   compiled for one CPU on another CPU. Linux system calls are converted
120   because of endianness and 32/64 bit mismatches. Wine (Windows
121   emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
122
123 - Full system emulation. In this mode, QEMU emulates a full system,
124   including a processor and various peripherials. It can also be used to
125   provide virtual hosting of several virtual PC on a single server.
126
127 %description -l pl.UTF-8
128 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
129 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
130 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
131
132 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
133   procesy linuksowe skompilowane dla jednego procesora na innym
134   procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
135   niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
136   słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
137   cele QEMU.
138
139 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
140   włączając w to procesor i różne urządzenia peryferyjne. Może być także
141   używane do wirtualnego hostowania kilku wirtualnych pecetów na
142   pojedynczym serwerze.
143
144 %package common
145 Summary:        QEMU common files needed by all QEMU targets
146 Summary(pl.UTF-8):      Wspólne pliki QEMU wymagane przez wszystkie środowiska QEMU
147 Group:          Development/Tools
148 Requires(postun):       /usr/sbin/groupdel
149 Requires(postun):       /usr/sbin/userdel
150 Requires(pre):  /bin/id
151 Requires(pre):  /usr/bin/getgid
152 Requires(pre):  /usr/sbin/groupadd
153 Requires(pre):  /usr/sbin/useradd
154 Requires(post,preun,postun):    systemd-units >= 38
155 Requires:       glib2 >= 1:2.12
156 Provides:       group(kvm)
157 Provides:       qemu-common = %{version}-%{release}
158 Requires:       systemd-units >= 38
159 Conflicts:      qemu-kvm < 1.0-3
160
161 %description common
162 QEMU is a generic and open source processor emulator which achieves a
163 good emulation speed by using dynamic translation.
164
165 This package provides the common files needed by all QEMU targets.
166
167 %description common -l pl.UTF-8
168 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
169 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
170
171 Ten pakiet udostępnia wspólne pliki wymagane przez wszystkie
172 środowiska QEMU.
173
174 %package img
175 Summary:        QEMU command line tool for manipulating disk images
176 Summary(pl.UTF-8):      Narzędzie QEMU do operacji na obrazach dysków
177 Group:          Development/Tools
178 Conflicts:      qemu-kvm < 1.0-3
179
180 %description img
181 This package provides a command line tool for manipulating disk
182 images.
183
184 %description img -l pl.UTF-8
185 Ten pakiet udostępnia działające z linii poleceń narzędzia do operacji
186 na obrazach dysków.
187
188 %package user
189 Summary:        QEMU user mode emulation of qemu targets
190 Summary(pl.UTF-8):      QEMU - emulacja trybu użytkownika środowisk qemu
191 Group:          Development/Tools
192 Requires:       %{name}-common = %{version}-%{release}
193 Requires(post,postun):  systemd-units >= 38
194 Requires:       systemd-units >= 38
195
196 %description user
197 QEMU is a generic and open source processor emulator which achieves a
198 good emulation speed by using dynamic translation.
199
200 This package provides the user mode emulation of QEMU targets.
201
202 %description user -l pl.UTF-8
203 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
204 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
205
206 Ten pakiet udostępnia emulację trybu użytkownika środowisk QEMU.
207
208 %package system-alpha
209 Summary:        QEMU system emulator for Alpha
210 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem Alpha
211 Group:          Development/Tools
212 Requires:       %{name}-common = %{version}-%{release}
213 %systempkg_req
214
215 %description system-alpha
216 QEMU is a generic and open source processor emulator which achieves a
217 good emulation speed by using dynamic translation.
218
219 This package provides the system emulator with Alpha CPU.
220
221 %description system-alpha -l pl.UTF-8
222 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
223 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
224
225 Ten pakiet zawiera emulator systemu z procesorem Alpha.
226
227 %package system-arm
228 Summary:        QEMU system emulator for ARM
229 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem ARM
230 Group:          Development/Tools
231 Requires:       %{name}-common = %{version}-%{release}
232 %systempkg_req
233
234 %description system-arm
235 QEMU is a generic and open source processor emulator which achieves a
236 good emulation speed by using dynamic translation.
237
238 This package provides the system emulator for ARM.
239
240 %description system-arm -l pl.UTF-8
241 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
242 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
243
244 Ten pakiet zawiera emulator systemu z procesorem ARM.
245
246 %package system-cris
247 Summary:        QEMU system emulator for CRIS
248 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem CRIS
249 Group:          Development/Tools
250 Requires:       %{name}-common = %{version}-%{release}
251 %systempkg_req
252
253 %description system-cris
254 QEMU is a generic and open source processor emulator which achieves a
255 good emulation speed by using dynamic translation.
256
257 This package provides the system emulator with CRIS CPU.
258
259 %description system-cris -l pl.UTF-8
260 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
261 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
262
263 Ten pakiet zawiera emulator systemu z procesorem CRIS.
264
265 %package system-lm32
266 Summary:        QEMU system emulator for LM32
267 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem LM32
268 Group:          Development/Tools
269 Requires:       %{name}-common = %{version}-%{release}
270 %systempkg_req
271
272 %description system-lm32
273 QEMU is a generic and open source processor emulator which achieves a
274 good emulation speed by using dynamic translation.
275
276 This package provides the system emulator with LM32 CPU.
277
278 %description system-lm32 -l pl.UTF-8
279 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
280 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
281
282 Ten pakiet zawiera emulator systemu z procesorem LM32.
283
284 %package system-m68k
285 Summary:        QEMU system emulator for m68k
286 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem m68k
287 Group:          Development/Tools
288 Requires:       %{name}-common = %{version}-%{release}
289 %systempkg_req
290
291 %description system-m68k
292 QEMU is a generic and open source processor emulator which achieves a
293 good emulation speed by using dynamic translation.
294
295 This package provides the system emulator with m68k CPU.
296
297 %description system-m68k -l pl.UTF-8
298 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
299 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
300
301 Ten pakiet zawiera emulator systemu z procesorem m68k.
302
303 %package system-microblaze
304 Summary:        QEMU system emulator for MicroBlaze
305 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem MicroBlaze
306 Group:          Development/Tools
307 Requires:       %{name}-common = %{version}-%{release}
308 %systempkg_req
309
310 %description system-microblaze
311 QEMU is a generic and open source processor emulator which achieves a
312 good emulation speed by using dynamic translation.
313
314 This package provides the system emulator with MicroBlaze CPU.
315
316 %description system-microblaze -l pl.UTF-8
317 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
318 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
319
320 Ten pakiet zawiera emulator systemu z procesorem MicroBlaze.
321
322 %package system-mips
323 Summary:        QEMU system emulator for MIPS
324 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem MIPS
325 Group:          Development/Tools
326 Requires:       %{name}-common = %{version}-%{release}
327 %systempkg_req
328
329 %description system-mips
330 QEMU is a generic and open source processor emulator which achieves a
331 good emulation speed by using dynamic translation.
332
333 This package provides the system emulator with MIPS CPU.
334
335 %description system-mips -l pl.UTF-8
336 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
337 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
338
339 Ten pakiet zawiera emulator systemu z procesorem MIPS.
340
341 %package system-or32
342 Summary:        QEMU system emulator for OpenRISC
343 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem OpenRISC
344 Group:          Development/Tools
345 Requires:       %{name}-common = %{version}-%{release}
346 %systempkg_req
347
348 %description system-or32
349 QEMU is a generic and open source processor emulator which achieves a
350 good emulation speed by using dynamic translation.
351
352 This package provides the system emulator with OpenRISC CPU.
353
354 %description system-or32 -l pl.UTF-8
355 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
356 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
357
358 Ten pakiet zawiera emulator systemu z procesorem OpenRISC.
359
360 %package system-ppc
361 Summary:        QEMU system emulator for PowerPC
362 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem PowerPC
363 Group:          Development/Tools
364 Requires:       %{name}-common = %{version}-%{release}
365 %systempkg_req
366
367 %description system-ppc
368 QEMU is a generic and open source processor emulator which achieves a
369 good emulation speed by using dynamic translation.
370
371 This package provides the system emulator with PowerPC CPU.
372
373 %description system-ppc -l pl.UTF-8
374 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
375 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
376
377 Ten pakiet zawiera emulator systemu z procesorem PowerPC.
378
379 %package system-s390x
380 Summary:        QEMU system emulator for S390
381 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem S390
382 Group:          Development/Tools
383 Requires:       %{name}-common = %{version}-%{release}
384 %systempkg_req
385
386 %description system-s390x
387 QEMU is a generic and open source processor emulator which achieves a
388 good emulation speed by using dynamic translation.
389
390 This package provides the system emulator with S390 CPU.
391
392 %description system-s390x -l pl.UTF-8
393 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
394 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
395
396 Ten pakiet zawiera emulator systemu z procesorem S390.
397
398 %package system-sh4
399 Summary:        QEMU system emulator for SH4
400 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem SH4
401 Group:          Development/Tools
402 Requires:       %{name}-common = %{version}-%{release}
403 %systempkg_req
404
405 %description system-sh4
406 QEMU is a generic and open source processor emulator which achieves a
407 good emulation speed by using dynamic translation.
408
409 This package provides the system emulator with SH4 CPU.
410
411 %description system-sh4 -l pl.UTF-8
412 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
413 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
414
415 Ten pakiet zawiera emulator systemu z procesorem SH4.
416
417 %package system-sparc
418 Summary:        QEMU system emulator for SPARC
419 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem SPARC
420 Group:          Development/Tools
421 Requires:       %{name}-common = %{version}-%{release}
422 %systempkg_req
423
424 %description system-sparc
425 QEMU is a generic and open source processor emulator which achieves a
426 good emulation speed by using dynamic translation.
427
428 This package provides the system emulator with SPARC/SPARC64 CPU.
429
430 %description system-sparc -l pl.UTF-8
431 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
432 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
433
434 Ten pakiet zawiera emulator systemu z procesorem SPARC/SPARC64.
435
436 %package system-unicore32
437 Summary:        QEMU system emulator for UniCore32
438 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem UniCore32
439 Group:          Development/Tools
440 Requires:       %{name}-common = %{version}-%{release}
441 %systempkg_req
442
443 %description system-unicore32
444 QEMU is a generic and open source processor emulator which achieves a
445 good emulation speed by using dynamic translation.
446
447 This package provides the system emulator with UniCore32 CPU.
448
449 %description system-unicore32 -l pl.UTF-8
450 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
451 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
452
453 Ten pakiet zawiera emulator systemu z procesorem UniCore32.
454
455 %package system-x86
456 Summary:        QEMU system emulator for x86
457 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem x86
458 Group:          Development/Tools
459 Requires:       %{name}-common = %{version}-%{release}
460 %systempkg_req
461 Obsoletes:      kvm
462
463 %description system-x86
464 QEMU is a generic and open source processor emulator which achieves a
465 good emulation speed by using dynamic translation.
466
467 This package provides the system emulator with x86 CPU. When being run
468 in a x86 machine that supports it, this package also provides the KVM
469 virtualization platform.
470
471 %description system-x86 -l pl.UTF-8
472 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
473 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
474
475 Ten pakiet zawiera emulator systemu z procesorem x86. W przypadku
476 uruchomienia na maszynie x86 pozwalającej na to, ten pakiet udostępnia
477 także platformę wirtualizacji KVM.
478
479 %package system-xtensa
480 Summary:        QEMU system emulator for Xtensa
481 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem Xtensa
482 Group:          Development/Tools
483 Requires:       %{name}-common = %{version}-%{release}
484 %systempkg_req
485
486 %description system-xtensa
487 QEMU is a generic and open source processor emulator which achieves a
488 good emulation speed by using dynamic translation.
489
490 This package provides the system emulator with Xtensa CPU.
491
492 %description system-xtensa -l pl.UTF-8
493 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
494 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
495
496 Ten pakiet zawiera emulator systemu z procesorem Xtensa.
497
498 %package guest-agent
499 Summary:        QEMU guest agent
500 Summary(pl.UTF-8):      Agent gościa QEMU
501 Group:          Daemons
502 Requires(post,preun,postun):    systemd-units >= 38
503 Requires:       glib2 >= 1:2.12
504 Requires:       systemd-units >= 38
505
506 %description guest-agent
507 QEMU is a generic and open source processor emulator which achieves
508 a good emulation speed by using dynamic translation.
509
510 This package provides an agent to run inside guests, which
511 communicates with the host over a virtio-serial channel named
512 "org.qemu.guest_agent.0".
513
514 This package does not need to be installed on the host OS.
515
516 %description guest-agent -l pl.UTF-8
517 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
518 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
519
520 Ten pakiet udostępnia agenta przeznaczonego do uruchomienia w
521 systemach-gościach, komunikującego się kanałem virtio-serial o nazwie
522 "org.qemu.guest_agent.0".
523
524 Ten pakiet nie musi być zainstalowany w systemie hosta.
525
526 %prep
527 %setup -q
528 %patch0 -p1
529 %patch1 -p1
530 %patch2 -p1
531 %patch3 -p1
532 %patch4 -p1
533 %patch5 -p1
534
535 %{__mv} libcacard libcacard-use-system-lib
536
537 cp -a %{SOURCE1} pc-bios/bios.bin
538
539 # workaround for conflict with alsa/error.h
540 ln -s ../error.h qapi/error.h
541
542 %build
543 common_opts="\
544         --disable-strip \
545         --enable-attr \
546         --enable-bluez \
547         --enable-brlapi \
548         --enable-cap-ng \
549         --enable-curl \
550         --enable-curses \
551         --enable-docs \
552         --enable-fdt \
553         --enable-libiscsi \
554         --enable-mixemu \
555         %{__enable_disable opengl} \
556         %{__enable_disable ceph rbd} \
557         %{__enable_disable sdl} \
558         --enable-seccomp \
559         %{__enable_disable spice} \
560         --enable-smartcard \
561         --enable-smartcard-nss \
562         --enable-usb-redir \
563         --enable-uuid \
564         --enable-vde \
565         --enable-virtfs \
566         --enable-vnc-jpeg \
567         --enable-vnc-png \
568         --enable-vnc-sasl \
569         --enable-vnc-tls \
570         %{__enable_disable xen} \
571         --audio-drv-list=alsa%{?with_oss:,oss}%{?with_sdl:,sdl}%{?with_esd:,esd}%{?with_pulseaudio:,pa} \
572         --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda \
573         --interp-prefix=%{_libdir}/qemu/lib-%%M"
574
575 %ifarch %{ix86} %{x8664}
576 ./configure \
577         --target-list="x86_64-softmmu" \
578         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
579         --extra-ldflags="%{rpmldflags}" \
580         --prefix=%{_prefix} \
581         --sysconfdir=%{_sysconfdir} \
582         --cc="%{__cc}" \
583         --host-cc="%{__cc}" \
584         $common_opts \
585         --enable-kvm \
586         --enable-system
587
588 # note: CONFIG_QEMU_HELPERDIR is used when compiling, libexecdir when installing;
589 # --libexecdir in configure is nop
590 %{__make} \
591         V=1 \
592         CONFIG_QEMU_HELPERDIR="%{_libdir}"
593 cp -a x86_64-softmmu/qemu-system-x86_64 qemu-kvm
594 %{__make} clean \
595         V=1
596 %endif
597
598 ./configure \
599         --target-list="" \
600         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
601         --extra-ldflags="%{rpmldflags}" \
602         --prefix=%{_prefix} \
603         --sysconfdir=%{_sysconfdir} \
604         --cc="%{__cc}" \
605         --host-cc="%{__cc}" \
606         $common_opts \
607         --disable-kvm \
608         --enable-system
609
610 # note: CONFIG_QEMU_HELPERDIR is used when compiling, libexecdir when installing;
611 # --libexecdir in configure is nop
612 %{__make} \
613         V=1 \
614         CONFIG_QEMU_HELPERDIR="%{_libdir}"
615
616 %{__cc} %{SOURCE7} %{rpmcflags} -o ksmctl
617
618 %install
619 rm -rf $RPM_BUILD_ROOT
620 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/usr/lib/binfmt.d} \
621         $RPM_BUILD_ROOT/etc/{sysconfig,udev/rules.d,modules-load.d} \
622         $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
623
624 %{__make} install \
625         V=1 \
626         DESTDIR=$RPM_BUILD_ROOT \
627         libexecdir=%{_libdir}
628
629 install -d $RPM_BUILD_ROOT%{_sysconfdir}
630 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
631 #!/bin/sh
632
633 EOF
634
635 install -p qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl/qemu.conf
636
637 install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/ksm.service
638 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ksm
639 install -p ksmctl $RPM_BUILD_ROOT%{_sbindir}
640
641 install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/ksmtuned.service
642 install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
643 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
644
645 %ifarch %{ix86} %{x8664}
646 install qemu-kvm $RPM_BUILD_ROOT%{_bindir}/qemu-system-x86_64
647 ln -s qemu-system-x86_64 $RPM_BUILD_ROOT%{_bindir}/qemu-kvm
648 install scripts/kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}
649 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/modules-load.d/kvm.conf
650 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
651 %endif
652
653 # For the qemu-guest-agent subpackage install the systemd
654 # service and udev rules.
655 install -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
656 install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
657
658 for i in dummy \
659 %ifnarch %{ix86} %{x8664}
660     qemu-i386 \
661 %endif
662 %ifnarch arm
663     qemu-arm \
664 %endif
665 %ifnarch ppc ppc64
666     qemu-ppc \
667 %endif
668 %ifnarch sparc sparc64
669     qemu-sparc \
670 %endif
671 %ifnarch sh4
672     qemu-sh4 \
673 %endif
674 ; do
675         test $i = dummy && continue
676         grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i.conf
677 done < %{SOURCE2}
678
679 # already packaged
680 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
681 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qmp-commands.txt
682
683 %clean
684 rm -rf $RPM_BUILD_ROOT
685
686 %pre common
687 %groupadd -g 160 kvm
688 %groupadd -g 276 qemu
689 %useradd -u 276 -g qemu -G kvm -c "QEMU User" qemu
690
691 %post common
692 %systemd_post ksm.service
693 %systemd_post ksmtuned.service
694
695 %preun common
696 %systemd_preun ksm.service
697 %systemd_preun ksmtuned.service
698
699 %postun common
700 if [ "$1" = "0" ]; then
701         %userremove qemu
702         %groupremove qemu
703         %groupremove kvm
704 fi
705 %systemd_reload
706
707 %triggerpostun common -- %{name} < 1.0-3
708 %systemd_trigger ksm.service
709 %systemd_trigger ksmtuned.service
710
711 %post user
712 %systemd_service_restart systemd-binfmt.service
713
714 %postun user
715 %systemd_service_restart systemd-binfmt.service
716
717 %post guest-agent
718 %systemd_reload
719
720 %preun guest-agent
721 %systemd_preun qemu-guest-agent.service
722
723 %postun guest-agent
724 %systemd_reload
725
726 %files
727 %defattr(644,root,root,755)
728
729 %files common
730 %defattr(644,root,root,755)
731 %doc README qemu-doc.html qemu-tech.html QMP/qmp-commands.txt
732 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
733 %dir %{_sysconfdir}/qemu
734 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
735 %config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf
736 %config(noreplace) %verify(not md5 mtime size) /etc/sasl/qemu.conf
737 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ksm
738 %{systemdunitdir}/ksm.service
739 %{systemdunitdir}/ksmtuned.service
740 %attr(755,root,root) %{_bindir}/qemu-nbd
741 %attr(755,root,root) %{_bindir}/virtfs-proxy-helper
742 %attr(755,root,root) %{_libdir}/qemu-bridge-helper
743 %attr(755,root,root) %{_sbindir}/ksmctl
744 %attr(755,root,root) %{_sbindir}/ksmtuned
745 %{_mandir}/man1/qemu.1*
746 %{_mandir}/man1/virtfs-proxy-helper.1*
747 %{_mandir}/man8/qemu-nbd.8*
748
749 %dir %{_datadir}/qemu
750 %{_datadir}/qemu/cpus-*.conf
751 %{_datadir}/qemu/keymaps
752 %{_datadir}/qemu/qemu-icon.bmp
753 # various bios images
754 %{_datadir}/qemu/*.bin
755 %{_datadir}/qemu/*.rom
756 %{_datadir}/qemu/*.dtb
757 %{_datadir}/qemu/openbios-ppc
758 %{_datadir}/qemu/openbios-sparc*
759 %{_datadir}/qemu/palcode-clipper
760
761 %files img
762 %defattr(644,root,root,755)
763 %attr(755,root,root) %{_bindir}/qemu-img
764 %{_mandir}/man1/qemu-img.1*
765
766 %files user
767 %defattr(644,root,root,755)
768 /usr/lib/binfmt.d/qemu-*.conf
769 %attr(755,root,root) %{_bindir}/qemu-alpha
770 %attr(755,root,root) %{_bindir}/qemu-arm
771 %attr(755,root,root) %{_bindir}/qemu-armeb
772 %attr(755,root,root) %{_bindir}/qemu-cris
773 %attr(755,root,root) %{_bindir}/qemu-i386
774 %attr(755,root,root) %{_bindir}/qemu-io
775 %attr(755,root,root) %{_bindir}/qemu-m68k
776 %attr(755,root,root) %{_bindir}/qemu-microblaze
777 %attr(755,root,root) %{_bindir}/qemu-microblazeel
778 %attr(755,root,root) %{_bindir}/qemu-mips
779 %attr(755,root,root) %{_bindir}/qemu-mipsel
780 %attr(755,root,root) %{_bindir}/qemu-or32
781 %attr(755,root,root) %{_bindir}/qemu-ppc
782 %attr(755,root,root) %{_bindir}/qemu-ppc64
783 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
784 %attr(755,root,root) %{_bindir}/qemu-s390x
785 %attr(755,root,root) %{_bindir}/qemu-sh4
786 %attr(755,root,root) %{_bindir}/qemu-sh4eb
787 %attr(755,root,root) %{_bindir}/qemu-sparc
788 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
789 %attr(755,root,root) %{_bindir}/qemu-sparc64
790 %attr(755,root,root) %{_bindir}/qemu-unicore32
791 %attr(755,root,root) %{_bindir}/qemu-x86_64
792
793 %files system-alpha
794 %defattr(644,root,root,755)
795 %attr(755,root,root) %{_bindir}/qemu-system-alpha
796
797 %files system-arm
798 %defattr(644,root,root,755)
799 %attr(755,root,root) %{_bindir}/qemu-system-arm
800
801 %files system-cris
802 %defattr(644,root,root,755)
803 %attr(755,root,root) %{_bindir}/qemu-system-cris
804
805 %files system-lm32
806 %defattr(644,root,root,755)
807 %attr(755,root,root) %{_bindir}/qemu-system-lm32
808
809 %files system-m68k
810 %defattr(644,root,root,755)
811 %attr(755,root,root) %{_bindir}/qemu-system-m68k
812
813 %files system-microblaze
814 %defattr(644,root,root,755)
815 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
816 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
817
818 %files system-mips
819 %defattr(644,root,root,755)
820 %attr(755,root,root) %{_bindir}/qemu-system-mips
821 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
822 %attr(755,root,root) %{_bindir}/qemu-system-mips64
823 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
824
825 %files system-or32
826 %defattr(644,root,root,755)
827 %attr(755,root,root) %{_bindir}/qemu-system-or32
828
829 %files system-ppc
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_bindir}/qemu-system-ppc
832 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
833 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
834
835 %files system-s390x
836 %defattr(644,root,root,755)
837 %attr(755,root,root) %{_bindir}/qemu-system-s390x
838
839 %files system-sh4
840 %defattr(644,root,root,755)
841 %attr(755,root,root) %{_bindir}/qemu-system-sh4
842 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
843
844 %files system-sparc
845 %defattr(644,root,root,755)
846 %attr(755,root,root) %{_bindir}/qemu-system-sparc
847 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
848
849 %files system-unicore32
850 %defattr(644,root,root,755)
851 %attr(755,root,root) %{_bindir}/qemu-system-unicore32
852
853 %files system-x86
854 %defattr(644,root,root,755)
855 %ifarch %{ix86} %{x8664}
856 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/kvm.conf
857 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/80-kvm.rules
858 %endif
859 %attr(755,root,root) %{_bindir}/kvm_stat
860 %attr(755,root,root) %{_bindir}/qemu-kvm
861 %attr(755,root,root) %{_bindir}/qemu-system-i386
862 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
863
864 %files system-xtensa
865 %defattr(644,root,root,755)
866 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
867 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb
868
869 %files guest-agent
870 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules
871 %{systemdunitdir}/qemu-guest-agent.service
872 %attr(755,root,root) %{_bindir}/qemu-ga
This page took 0.102527 seconds and 2 git commands to generate.