3 # - qemu-system-ppc -hda ac-ppc.img says:
4 # qemu: could not open disk image ac-ppc.img: error "Success"
5 # qemu-0.12.2-2.x86_64.rpm - broken
6 # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
7 # qemu-0.15.0-2.x86_64.rpm - qemu-system-sparc/ppc booting with -kernel, -initrd options stalls in openbios prompt
8 # qemu-0.11.1-*.x86_64.rpm - OK
11 %bcond_with cflags_passing # with passing rpmcflags to Makefiles
12 %bcond_with dosguest # add special patch when use with DOS as guest os
13 %bcond_with nosdlgui # do not use SDL gui (use X11 instead)
15 Summary: QEMU CPU Emulator
16 Summary(pl.UTF-8): QEMU - emulator procesora
21 Group: Applications/Emulators
22 Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.gz
23 # Source0-md5: a64b36067a191451323b0d34ebb44954
24 Patch0: %{name}-ncurses.patch
25 Patch6: %{name}-nosdlgui.patch
26 # Proof of concept, for reference, do not remove
27 Patch8: %{name}-kde_virtual_workspaces_hack.patch
28 #Patch12: %{name}-0.7.2-dyngen-check-stack-clobbers.patch
29 Patch13: %{name}-dosguest.patch
30 Patch14: %{name}-ppc_old_binutils.patch
31 Patch15: %{name}-isa-bios-ram.patch
32 # below one fixes problems with passing ram size to bios/bootloader
33 # which affects coreboot/linuxbios
34 Patch16: %{name}-piix-ram-size.patch
35 Patch17: %{name}-whitelist.patch
36 URL: http://wiki.qemu.org/Index.html
37 BuildRequires: SDL-devel >= 1.2.1
38 BuildRequires: alsa-lib-devel
39 BuildRequires: bluez-libs-devel
40 BuildRequires: gnutls-devel
41 BuildRequires: ncurses-devel
42 BuildRequires: perl-Encode
43 BuildRequires: perl-tools-pod
44 BuildRequires: pkgconfig
45 BuildRequires: sed >= 4.0
46 BuildRequires: texi2html
48 BuildRequires: xorg-lib-libX11-devel
49 Requires: %{name}-img = %{version}-%{release}
50 Requires: %{name}-system-alpha = %{version}-%{release}
51 Requires: %{name}-system-arm = %{version}-%{release}
52 Requires: %{name}-system-cris = %{version}-%{release}
53 Requires: %{name}-system-lm32 = %{version}-%{release}
54 Requires: %{name}-system-m68k = %{version}-%{release}
55 Requires: %{name}-system-microblaze = %{version}-%{release}
56 Requires: %{name}-system-mips = %{version}-%{release}
57 Requires: %{name}-system-ppc = %{version}-%{release}
58 Requires: %{name}-system-s390x = %{version}-%{release}
59 Requires: %{name}-system-sh4 = %{version}-%{release}
60 Requires: %{name}-system-sparc = %{version}-%{release}
61 Requires: %{name}-system-x86 = %{version}-%{release}
62 Requires: %{name}-system-xtensa = %{version}-%{release}
63 Requires: %{name}-user = %{version}-%{release}
64 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
65 ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc}
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 # some PPC/SPARC boot image in ELF format
69 %define _noautostrip .*%{_datadir}/qemu/.*-.* .*%{_datadir}/qemu/bios.bin
72 QEMU is a FAST! processor emulator. By using dynamic translation it
73 achieves a reasonnable speed while being easy to port on new host
74 CPUs. QEMU has two operating modes:
76 - User mode emulation. In this mode, QEMU can launch Linux processes
77 compiled for one CPU on another CPU. Linux system calls are converted
78 because of endianness and 32/64 bit mismatches. Wine (Windows
79 emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
81 - Full system emulation. In this mode, QEMU emulates a full system,
82 including a processor and various peripherials. It can also be used to
83 provide virtual hosting of several virtual PC on a single server.
85 %description -l pl.UTF-8
86 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
87 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
88 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
90 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
91 procesy linuksowe skompilowane dla jednego procesora na innym
92 procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
93 niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
94 słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
97 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
98 włączając w to procesor i różne urządzenia peryferyjne. Może być także
99 używane do wirtualnego hostowania kilku wirtualnych pecetów na
100 pojedynczym serwerze.
103 Summary: QEMU common files needed by all QEMU targets
104 Group: Development/Tools
105 Requires: SDL >= 1.2.1
106 Conflicts: qemu < 1.0-2
109 QEMU is a generic and open source processor emulator which achieves a
110 good emulation speed by using dynamic translation.
112 This package provides the common files needed by all QEMU targets.
115 Summary: QEMU command line tool for manipulating disk images
116 Group: Development/Tools
117 Conflicts: qemu < 1.0-2
120 This package provides a command line tool for manipulating disk images
123 Summary: QEMU user mode emulation of qemu targets
124 Group: Development/Tools
125 Requires: %{name}-common = %{version}-%{release}
128 QEMU is a generic and open source processor emulator which achieves a
129 good emulation speed by using dynamic translation.
131 This package provides the user mode emulation of QEMU targets.
133 %package system-alpha
134 Summary: QEMU system emulator for alpha
135 Group: Development/Tools
136 Requires: %{name}-common = %{version}-%{release}
138 %description system-alpha
139 QEMU is a generic and open source processor emulator which achieves a
140 good emulation speed by using dynamic translation.
142 This package provides the system emulator for alpha.
145 Summary: QEMU system emulator for arm
146 Group: Development/Tools
147 Requires: %{name}-common = %{version}-%{release}
149 %description system-arm
150 QEMU is a generic and open source processor emulator which achieves a
151 good emulation speed by using dynamic translation.
153 This package provides the system emulator for arm.
156 Summary: QEMU system emulator for cris
157 Group: Development/Tools
158 Requires: %{name}-common = %{version}-%{release}
160 %description system-cris
161 QEMU is a generic and open source processor emulator which achieves a
162 good emulation speed by using dynamic translation.
164 This package provides the system emulator for cris.
167 Summary: QEMU system emulator for lm32
168 Group: Development/Tools
169 Requires: %{name}-common = %{version}-%{release}
171 %description system-lm32
172 QEMU is a generic and open source processor emulator which achieves a
173 good emulation speed by using dynamic translation.
175 This package provides the system emulator for lm32.
178 Summary: QEMU system emulator for m68k
179 Group: Development/Tools
180 Requires: %{name}-common = %{version}-%{release}
182 %description system-m68k
183 QEMU is a generic and open source processor emulator which achieves a
184 good emulation speed by using dynamic translation.
186 This package provides the system emulator for m68k.
188 %package system-microblaze
189 Summary: QEMU system emulator for microblaze
190 Group: Development/Tools
191 Requires: %{name}-common = %{version}-%{release}
193 %description system-microblaze
194 QEMU is a generic and open source processor emulator which achieves a
195 good emulation speed by using dynamic translation.
197 This package provides the system emulator for microblaze.
200 Summary: QEMU system emulator for mips
201 Group: Development/Tools
202 Requires: %{name}-common = %{version}-%{release}
204 %description system-mips
205 QEMU is a generic and open source processor emulator which achieves a
206 good emulation speed by using dynamic translation.
208 This package provides the system emulator for mips.
211 Summary: QEMU system emulator for ppc
212 Group: Development/Tools
213 Requires: %{name}-common = %{version}-%{release}
215 %description system-ppc
216 QEMU is a generic and open source processor emulator which achieves a
217 good emulation speed by using dynamic translation.
219 This package provides the system emulator for ppc.
221 %package system-s390x
222 Summary: QEMU system emulator for s390x
223 Group: Development/Tools
224 Requires: %{name}-common = %{version}-%{release}
226 %description system-s390x
227 QEMU is a generic and open source processor emulator which achieves a
228 good emulation speed by using dynamic translation.
230 This package provides the system emulator for s390x.
233 Summary: QEMU system emulator for sh4
234 Group: Development/Tools
235 Requires: %{name}-common = %{version}-%{release}
237 %description system-sh4
238 QEMU is a generic and open source processor emulator which achieves a
239 good emulation speed by using dynamic translation.
241 This package provides the system emulator for sh4.
243 %package system-sparc
244 Summary: QEMU system emulator for sparc
245 Group: Development/Tools
246 Requires: %{name}-common = %{version}-%{release}
248 %description system-sparc
249 QEMU is a generic and open source processor emulator which achieves a
250 good emulation speed by using dynamic translation.
252 This package provides the system emulator for sparc/sparc64.
255 Summary: QEMU system emulator for x86
256 Group: Development/Tools
257 Requires: %{name}-common = %{version}-%{release}
260 %description system-x86
261 QEMU is a generic and open source processor emulator which achieves a
262 good emulation speed by using dynamic translation.
264 This package provides the system emulator for x86. When being run in a
265 x86 machine that supports it, this package also provides the KVM
266 virtualization platform.
268 %package system-xtensa
269 Summary: QEMU system emulator for xtensa
270 Group: Development/Tools
271 Requires: %{name}-common = %{version}-%{release}
273 %description system-xtensa
274 QEMU is a generic and open source processor emulator which achieves a
275 good emulation speed by using dynamic translation.
277 This package provides the system emulator for xtensa.
282 %{?with_nosdlgui:%patch6 -p1}
286 %{__sed} -i -e 's/sdl_static=yes/sdl_static=no/' configure
287 %{__sed} -i 's/.*MAKE) -C kqemu$//' Makefile
289 # cannot use optflags on x86 - they cause "no register to spill" errors
290 %if %{with cflags_passing}
291 %{__sed} -i -e 's/-g $CFLAGS/-Wall %{rpmcflags}/' configure
293 %{__sed} -i 's/-g $CFLAGS/-Wall -fno-var-tracking-assignments/' configure
296 # workaround for conflict with alsa/error.h
297 ln -s ../error.h qapi/error.h
300 # --extra-cflags don't work (overridden by CFLAGS in Makefile*)
301 # they can be passed if the cflags_passing bcond is used
303 --sysconfdir=%{_sysconfdir} \
304 --prefix=%{_prefix} \
306 --host-cc="%{__cc}" \
308 --audio-drv-list="alsa" \
309 --interp-prefix=%{_libdir}/%{name}
313 rm -rf $RPM_BUILD_ROOT
316 DESTDIR=$RPM_BUILD_ROOT
318 install -d $RPM_BUILD_ROOT%{_sysconfdir}
319 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
325 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
328 rm -rf $RPM_BUILD_ROOT
331 %defattr(644,root,root,755)
334 %defattr(644,root,root,755)
335 %doc README qemu-doc.html qemu-tech.html
336 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
337 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
338 %dir %{_sysconfdir}/qemu
339 %attr(755,root,root) %{_bindir}/qemu-nbd
340 %{_mandir}/man1/qemu.1*
341 %{_mandir}/man8/qemu-nbd.8*
343 %dir %{_datadir}/qemu
344 %{_datadir}/%{name}/keymaps
345 # various bios images
346 %{_datadir}/%{name}/*.bin
347 %{_datadir}/%{name}/*.rom
348 %{_datadir}/%{name}/*.dtb
349 %{_datadir}/%{name}/openbios-ppc
350 %{_datadir}/%{name}/openbios-sparc*
351 %{_datadir}/%{name}/palcode-clipper
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_bindir}/qemu-img
356 %{_mandir}/man1/qemu-img.1*
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_bindir}/qemu-x86_64
361 %attr(755,root,root) %{_bindir}/qemu-i386
362 %attr(755,root,root) %{_bindir}/qemu-alpha
363 %attr(755,root,root) %{_bindir}/qemu-arm
364 %attr(755,root,root) %{_bindir}/qemu-armeb
365 %attr(755,root,root) %{_bindir}/qemu-cris
366 %attr(755,root,root) %{_bindir}/qemu-ga
367 %attr(755,root,root) %{_bindir}/qemu-io
368 %attr(755,root,root) %{_bindir}/qemu-m68k
369 %attr(755,root,root) %{_bindir}/qemu-microblaze
370 %attr(755,root,root) %{_bindir}/qemu-microblazeel
371 %attr(755,root,root) %{_bindir}/qemu-mips
372 %attr(755,root,root) %{_bindir}/qemu-mipsel
373 %attr(755,root,root) %{_bindir}/qemu-ppc
374 %attr(755,root,root) %{_bindir}/qemu-ppc64
375 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
376 %attr(755,root,root) %{_bindir}/qemu-s390x
377 %attr(755,root,root) %{_bindir}/qemu-sh4
378 %attr(755,root,root) %{_bindir}/qemu-sh4eb
379 %attr(755,root,root) %{_bindir}/qemu-sparc
380 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
381 %attr(755,root,root) %{_bindir}/qemu-sparc64
382 %attr(755,root,root) %{_bindir}/qemu-unicore32
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_bindir}/qemu-system-alpha
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_bindir}/qemu-system-arm
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_bindir}/qemu-system-cris
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/qemu-system-lm32
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_bindir}/qemu-system-m68k
404 %files system-microblaze
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
407 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_bindir}/qemu-system-mips
412 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
413 %attr(755,root,root) %{_bindir}/qemu-system-mips64
414 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_bindir}/qemu-system-ppc
419 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
420 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_bindir}/qemu-system-s390x
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_bindir}/qemu-system-sh4
429 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
432 %defattr(644,root,root,755)
433 %attr(755,root,root) %{_bindir}/qemu-system-sparc
434 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_bindir}/qemu-system-i386
439 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
444 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb