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