2 # - package virtfs-proxy-helper, qemu-bridge-helper.
4 # - qemu-system-ppc -hda ac-ppc.img says:
5 # qemu: could not open disk image ac-ppc.img: error "Success"
6 # qemu-0.12.2-2.x86_64.rpm - broken
7 # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
8 # qemu-0.15.0-2.x86_64.rpm - qemu-system-sparc/ppc booting with -kernel, -initrd options stalls in openbios prompt
9 # qemu-0.11.1-*.x86_64.rpm - OK
12 %bcond_with nosdlgui # do not use SDL gui (use X11 instead)
14 Summary: QEMU CPU Emulator
15 Summary(pl.UTF-8): QEMU - emulator procesora
20 Group: Applications/Emulators
21 Source0: http://wiki.qemu.org/download/%{name}-%{version}-1.tar.bz2
22 # Source0-md5: f5c85c229b780bc39268845b6f365fc1
23 Patch0: qemu-cflags.patch
24 Patch6: %{name}-nosdlgui.patch
25 # Proof of concept, for reference, do not remove
26 Patch8: %{name}-kde_virtual_workspaces_hack.patch
27 Patch17: %{name}-whitelist.patch
28 URL: http://wiki.qemu.org/Index.html
29 BuildRequires: SDL-devel >= 1.2.1
30 BuildRequires: alsa-lib-devel
31 BuildRequires: bluez-libs-devel
32 BuildRequires: gnutls-devel
33 BuildRequires: ncurses-devel
34 BuildRequires: perl-Encode
35 BuildRequires: perl-tools-pod
36 BuildRequires: pkgconfig
37 BuildRequires: sed >= 4.0
38 BuildRequires: texi2html
39 BuildRequires: texinfo
41 BuildRequires: xen-devel
42 BuildRequires: xorg-lib-libX11-devel
43 Requires: %{name}-img = %{version}-%{release}
44 Requires: %{name}-system-alpha = %{version}-%{release}
45 Requires: %{name}-system-arm = %{version}-%{release}
46 Requires: %{name}-system-cris = %{version}-%{release}
47 Requires: %{name}-system-lm32 = %{version}-%{release}
48 Requires: %{name}-system-m68k = %{version}-%{release}
49 Requires: %{name}-system-microblaze = %{version}-%{release}
50 Requires: %{name}-system-mips = %{version}-%{release}
51 Requires: %{name}-system-ppc = %{version}-%{release}
52 Requires: %{name}-system-s390x = %{version}-%{release}
53 Requires: %{name}-system-sh4 = %{version}-%{release}
54 Requires: %{name}-system-sparc = %{version}-%{release}
55 Requires: %{name}-system-x86 = %{version}-%{release}
56 Requires: %{name}-system-xtensa = %{version}-%{release}
57 Requires: %{name}-user = %{version}-%{release}
58 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
59 ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc}
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 # some PPC/SPARC boot image in ELF format
63 %define _noautostrip .*%{_datadir}/qemu/.*-.*
66 QEMU is a FAST! processor emulator. By using dynamic translation it
67 achieves a reasonnable speed while being easy to port on new host
68 CPUs. QEMU has two operating modes:
70 - User mode emulation. In this mode, QEMU can launch Linux processes
71 compiled for one CPU on another CPU. Linux system calls are converted
72 because of endianness and 32/64 bit mismatches. Wine (Windows
73 emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
75 - Full system emulation. In this mode, QEMU emulates a full system,
76 including a processor and various peripherials. It can also be used to
77 provide virtual hosting of several virtual PC on a single server.
79 %description -l pl.UTF-8
80 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
81 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
82 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
84 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
85 procesy linuksowe skompilowane dla jednego procesora na innym
86 procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
87 niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
88 słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
91 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
92 włączając w to procesor i różne urządzenia peryferyjne. Może być także
93 używane do wirtualnego hostowania kilku wirtualnych pecetów na
97 Summary: QEMU common files needed by all QEMU targets
98 Group: Development/Tools
99 Requires: SDL >= 1.2.1
100 Conflicts: qemu < 1.0-2
103 QEMU is a generic and open source processor emulator which achieves a
104 good emulation speed by using dynamic translation.
106 This package provides the common files needed by all QEMU targets.
109 Summary: QEMU command line tool for manipulating disk images
110 Group: Development/Tools
111 Conflicts: qemu < 1.0-2
114 This package provides a command line tool for manipulating disk images
117 Summary: QEMU user mode emulation of qemu targets
118 Group: Development/Tools
119 Requires: %{name}-common = %{version}-%{release}
122 QEMU is a generic and open source processor emulator which achieves a
123 good emulation speed by using dynamic translation.
125 This package provides the user mode emulation of QEMU targets.
127 %package system-alpha
128 Summary: QEMU system emulator for alpha
129 Group: Development/Tools
130 Requires: %{name}-common = %{version}-%{release}
132 %description system-alpha
133 QEMU is a generic and open source processor emulator which achieves a
134 good emulation speed by using dynamic translation.
136 This package provides the system emulator for alpha.
139 Summary: QEMU system emulator for arm
140 Group: Development/Tools
141 Requires: %{name}-common = %{version}-%{release}
143 %description system-arm
144 QEMU is a generic and open source processor emulator which achieves a
145 good emulation speed by using dynamic translation.
147 This package provides the system emulator for arm.
150 Summary: QEMU system emulator for cris
151 Group: Development/Tools
152 Requires: %{name}-common = %{version}-%{release}
154 %description system-cris
155 QEMU is a generic and open source processor emulator which achieves a
156 good emulation speed by using dynamic translation.
158 This package provides the system emulator for cris.
161 Summary: QEMU system emulator for lm32
162 Group: Development/Tools
163 Requires: %{name}-common = %{version}-%{release}
165 %description system-lm32
166 QEMU is a generic and open source processor emulator which achieves a
167 good emulation speed by using dynamic translation.
169 This package provides the system emulator for lm32.
172 Summary: QEMU system emulator for m68k
173 Group: Development/Tools
174 Requires: %{name}-common = %{version}-%{release}
176 %description system-m68k
177 QEMU is a generic and open source processor emulator which achieves a
178 good emulation speed by using dynamic translation.
180 This package provides the system emulator for m68k.
182 %package system-microblaze
183 Summary: QEMU system emulator for microblaze
184 Group: Development/Tools
185 Requires: %{name}-common = %{version}-%{release}
187 %description system-microblaze
188 QEMU is a generic and open source processor emulator which achieves a
189 good emulation speed by using dynamic translation.
191 This package provides the system emulator for microblaze.
194 Summary: QEMU system emulator for mips
195 Group: Development/Tools
196 Requires: %{name}-common = %{version}-%{release}
198 %description system-mips
199 QEMU is a generic and open source processor emulator which achieves a
200 good emulation speed by using dynamic translation.
202 This package provides the system emulator for mips.
205 Summary: QEMU system emulator for ppc
206 Group: Development/Tools
207 Requires: %{name}-common = %{version}-%{release}
209 %description system-ppc
210 QEMU is a generic and open source processor emulator which achieves a
211 good emulation speed by using dynamic translation.
213 This package provides the system emulator for ppc.
215 %package system-s390x
216 Summary: QEMU system emulator for s390x
217 Group: Development/Tools
218 Requires: %{name}-common = %{version}-%{release}
220 %description system-s390x
221 QEMU is a generic and open source processor emulator which achieves a
222 good emulation speed by using dynamic translation.
224 This package provides the system emulator for s390x.
227 Summary: QEMU system emulator for sh4
228 Group: Development/Tools
229 Requires: %{name}-common = %{version}-%{release}
231 %description system-sh4
232 QEMU is a generic and open source processor emulator which achieves a
233 good emulation speed by using dynamic translation.
235 This package provides the system emulator for sh4.
237 %package system-sparc
238 Summary: QEMU system emulator for sparc
239 Group: Development/Tools
240 Requires: %{name}-common = %{version}-%{release}
242 %description system-sparc
243 QEMU is a generic and open source processor emulator which achieves a
244 good emulation speed by using dynamic translation.
246 This package provides the system emulator for sparc/sparc64.
249 Summary: QEMU system emulator for x86
250 Group: Development/Tools
251 Requires: %{name}-common = %{version}-%{release}
253 %description system-x86
254 QEMU is a generic and open source processor emulator which achieves a
255 good emulation speed by using dynamic translation.
257 This package provides the system emulator for x86. When being run in a
258 x86 machine that supports it, this package also provides the KVM
259 virtualization platform.
261 %package system-xtensa
262 Summary: QEMU system emulator for xtensa
263 Group: Development/Tools
264 Requires: %{name}-common = %{version}-%{release}
266 %description system-xtensa
267 QEMU is a generic and open source processor emulator which achieves a
268 good emulation speed by using dynamic translation.
270 This package provides the system emulator for xtensa.
275 %{?with_nosdlgui:%patch6 -p1}
279 # workaround for conflict with alsa/error.h
280 ln -s ../error.h qapi/error.h
284 --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
285 --extra-ldflags="%{rpmldflags}" \
286 --sysconfdir=%{_sysconfdir} \
287 --prefix=%{_prefix} \
289 --host-cc="%{__cc}" \
291 --audio-drv-list="alsa" \
292 --interp-prefix=%{_libdir}/%{name}
296 rm -rf $RPM_BUILD_ROOT
299 DESTDIR=$RPM_BUILD_ROOT
301 install -d $RPM_BUILD_ROOT%{_sysconfdir}
302 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
308 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
311 rm -rf $RPM_BUILD_ROOT
314 %defattr(644,root,root,755)
317 %defattr(644,root,root,755)
318 %doc README qemu-doc.html qemu-tech.html
319 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
320 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
321 %dir %{_sysconfdir}/qemu
322 %attr(755,root,root) %{_bindir}/qemu-nbd
323 %{_mandir}/man1/qemu.1*
324 %{_mandir}/man8/qemu-nbd.8*
326 %dir %{_datadir}/qemu
327 %{_datadir}/%{name}/cpus-*.conf
328 %{_datadir}/%{name}/keymaps
329 # various bios images
330 %{_datadir}/%{name}/*.bin
331 %{_datadir}/%{name}/*.rom
332 %{_datadir}/%{name}/*.dtb
333 %{_datadir}/%{name}/openbios-ppc
334 %{_datadir}/%{name}/openbios-sparc*
335 %{_datadir}/%{name}/palcode-clipper
338 %defattr(644,root,root,755)
339 %attr(755,root,root) %{_bindir}/qemu-img
340 %{_mandir}/man1/qemu-img.1*
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_bindir}/qemu-x86_64
345 %attr(755,root,root) %{_bindir}/qemu-i386
346 %attr(755,root,root) %{_bindir}/qemu-alpha
347 %attr(755,root,root) %{_bindir}/qemu-arm
348 %attr(755,root,root) %{_bindir}/qemu-armeb
349 %attr(755,root,root) %{_bindir}/qemu-cris
350 %attr(755,root,root) %{_bindir}/qemu-ga
351 %attr(755,root,root) %{_bindir}/qemu-io
352 %attr(755,root,root) %{_bindir}/qemu-m68k
353 %attr(755,root,root) %{_bindir}/qemu-microblaze
354 %attr(755,root,root) %{_bindir}/qemu-microblazeel
355 %attr(755,root,root) %{_bindir}/qemu-mips
356 %attr(755,root,root) %{_bindir}/qemu-mipsel
357 %attr(755,root,root) %{_bindir}/qemu-ppc
358 %attr(755,root,root) %{_bindir}/qemu-ppc64
359 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
360 %attr(755,root,root) %{_bindir}/qemu-s390x
361 %attr(755,root,root) %{_bindir}/qemu-sh4
362 %attr(755,root,root) %{_bindir}/qemu-sh4eb
363 %attr(755,root,root) %{_bindir}/qemu-sparc
364 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
365 %attr(755,root,root) %{_bindir}/qemu-sparc64
366 %attr(755,root,root) %{_bindir}/qemu-unicore32
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_bindir}/qemu-system-alpha
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_bindir}/qemu-system-arm
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_bindir}/qemu-system-cris
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_bindir}/qemu-system-lm32
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_bindir}/qemu-system-m68k
388 %files system-microblaze
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
391 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_bindir}/qemu-system-mips
396 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
397 %attr(755,root,root) %{_bindir}/qemu-system-mips64
398 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_bindir}/qemu-system-ppc
403 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
404 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_bindir}/qemu-system-s390x
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/qemu-system-sh4
413 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_bindir}/qemu-system-sparc
418 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_bindir}/qemu-system-i386
423 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
428 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb