]>
Commit | Line | Data |
---|---|---|
0b920c52 | 1 | # TODO: |
3d0e0752 | 2 | # - package virtfs-proxy-helper, qemu-bridge-helper. |
697b0ba8 | 3 | # - package qemu-system-or32 |
98a1a188 | 4 | # - update patches |
01b9430c | 5 | # - qemu-system-ppc -hda ac-ppc.img says: |
fabf5a9c | 6 | # qemu: could not open disk image ac-ppc.img: error "Success" |
01b9430c | 7 | # qemu-0.12.2-2.x86_64.rpm - broken |
cef095a4 | 8 | # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init" |
fabf5a9c ER |
9 | # qemu-0.15.0-2.x86_64.rpm - qemu-system-sparc/ppc booting with -kernel, -initrd options stalls in openbios prompt |
10 | # qemu-0.11.1-*.x86_64.rpm - OK | |
0b920c52 | 11 | # |
6aef4654 | 12 | # Conditional build: |
a6d3659e | 13 | %bcond_with nosdlgui # do not use SDL gui (use X11 instead) |
007877cb | 14 | |
cd19124e | 15 | Summary: QEMU CPU Emulator |
eec0535a | 16 | Summary(pl.UTF-8): QEMU - emulator procesora |
7b81d160 | 17 | Name: qemu |
697b0ba8 | 18 | Version: 1.2.0 |
ad857655 | 19 | Release: 1 |
5a2da1d0 JB |
20 | License: GPL |
21 | Group: Applications/Emulators | |
697b0ba8 PS |
22 | Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2 |
23 | # Source0-md5: 78eb1e984f4532aa9f2bdd3c127b5b61 | |
9bcd4ab6 | 24 | Patch0: %{name}-cflags.patch |
7b81d160 | 25 | Patch6: %{name}-nosdlgui.patch |
81a493f2 | 26 | # Proof of concept, for reference, do not remove |
7b81d160 | 27 | Patch8: %{name}-kde_virtual_workspaces_hack.patch |
ba4329df | 28 | Patch17: %{name}-whitelist.patch |
d6bd22e9 | 29 | URL: http://wiki.qemu.org/Index.html |
867764ba | 30 | BuildRequires: SDL-devel >= 1.2.1 |
b0b3ca8d | 31 | BuildRequires: alsa-lib-devel |
b99b1652 AM |
32 | BuildRequires: bluez-libs-devel |
33 | BuildRequires: gnutls-devel | |
98a1a188 | 34 | BuildRequires: ncurses-devel |
995bac8b | 35 | BuildRequires: perl-Encode |
2fb8ea02 | 36 | BuildRequires: perl-tools-pod |
ba84a935 | 37 | BuildRequires: pkgconfig |
8bb1261c | 38 | BuildRequires: sed >= 4.0 |
a1146336 | 39 | BuildRequires: texi2html |
22f71ecb | 40 | BuildRequires: texinfo |
cad677a4 | 41 | BuildRequires: which |
3d0e0752 | 42 | BuildRequires: xen-devel |
ba84a935 | 43 | BuildRequires: xorg-lib-libX11-devel |
fabf5a9c ER |
44 | Requires: %{name}-img = %{version}-%{release} |
45 | Requires: %{name}-system-alpha = %{version}-%{release} | |
46 | Requires: %{name}-system-arm = %{version}-%{release} | |
47 | Requires: %{name}-system-cris = %{version}-%{release} | |
48 | Requires: %{name}-system-lm32 = %{version}-%{release} | |
49 | Requires: %{name}-system-m68k = %{version}-%{release} | |
50 | Requires: %{name}-system-microblaze = %{version}-%{release} | |
51 | Requires: %{name}-system-mips = %{version}-%{release} | |
52 | Requires: %{name}-system-ppc = %{version}-%{release} | |
53 | Requires: %{name}-system-s390x = %{version}-%{release} | |
54 | Requires: %{name}-system-sh4 = %{version}-%{release} | |
55 | Requires: %{name}-system-sparc = %{version}-%{release} | |
56 | Requires: %{name}-system-x86 = %{version}-%{release} | |
57 | Requires: %{name}-system-xtensa = %{version}-%{release} | |
58 | Requires: %{name}-user = %{version}-%{release} | |
2ef13cb9 | 59 | # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c) |
007877cb | 60 | ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc} |
cd19124e | 61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
62 | ||
98a1a188 | 63 | # some PPC/SPARC boot image in ELF format |
22f71ecb | 64 | %define _noautostrip .*%{_datadir}/qemu/.*-.* |
a154aede | 65 | |
cd19124e | 66 | %description |
67 | QEMU is a FAST! processor emulator. By using dynamic translation it | |
68 | achieves a reasonnable speed while being easy to port on new host | |
69 | CPUs. QEMU has two operating modes: | |
70 | ||
71 | - User mode emulation. In this mode, QEMU can launch Linux processes | |
72 | compiled for one CPU on another CPU. Linux system calls are converted | |
73 | because of endianness and 32/64 bit mismatches. Wine (Windows | |
74 | emulation) and DOSEMU (DOS emulation) are the main targets for QEMU. | |
75 | ||
76 | - Full system emulation. In this mode, QEMU emulates a full system, | |
8799423b ER |
77 | including a processor and various peripherials. It can also be used to |
78 | provide virtual hosting of several virtual PC on a single server. | |
cd19124e | 79 | |
27b30e9c JR |
80 | %description -l pl.UTF-8 |
81 | QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego | |
82 | tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania, | |
83 | aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy: | |
5a2da1d0 | 84 | |
27b30e9c | 85 | - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać |
5a2da1d0 | 86 | procesy linuksowe skompilowane dla jednego procesora na innym |
27b30e9c JR |
87 | procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na |
88 | niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru | |
89 | słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne | |
5a2da1d0 JB |
90 | cele QEMU. |
91 | ||
27b30e9c JR |
92 | - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system, |
93 | włączając w to procesor i różne urządzenia peryferyjne. Może być także | |
94 | używane do wirtualnego hostowania kilku wirtualnych pecetów na | |
8799423b | 95 | pojedynczym serwerze. |
5a2da1d0 | 96 | |
fabf5a9c ER |
97 | %package common |
98 | Summary: QEMU common files needed by all QEMU targets | |
99 | Group: Development/Tools | |
100 | Requires: SDL >= 1.2.1 | |
101 | Conflicts: qemu < 1.0-2 | |
102 | ||
103 | %description common | |
104 | QEMU is a generic and open source processor emulator which achieves a | |
105 | good emulation speed by using dynamic translation. | |
106 | ||
107 | This package provides the common files needed by all QEMU targets. | |
108 | ||
109 | %package img | |
110 | Summary: QEMU command line tool for manipulating disk images | |
111 | Group: Development/Tools | |
112 | Conflicts: qemu < 1.0-2 | |
113 | ||
114 | %description img | |
115 | This package provides a command line tool for manipulating disk images | |
116 | ||
117 | %package user | |
118 | Summary: QEMU user mode emulation of qemu targets | |
119 | Group: Development/Tools | |
120 | Requires: %{name}-common = %{version}-%{release} | |
121 | ||
122 | %description user | |
123 | QEMU is a generic and open source processor emulator which achieves a | |
124 | good emulation speed by using dynamic translation. | |
125 | ||
126 | This package provides the user mode emulation of QEMU targets. | |
127 | ||
128 | %package system-alpha | |
129 | Summary: QEMU system emulator for alpha | |
130 | Group: Development/Tools | |
131 | Requires: %{name}-common = %{version}-%{release} | |
132 | ||
133 | %description system-alpha | |
134 | QEMU is a generic and open source processor emulator which achieves a | |
135 | good emulation speed by using dynamic translation. | |
136 | ||
137 | This package provides the system emulator for alpha. | |
138 | ||
139 | %package system-arm | |
140 | Summary: QEMU system emulator for arm | |
141 | Group: Development/Tools | |
142 | Requires: %{name}-common = %{version}-%{release} | |
143 | ||
144 | %description system-arm | |
145 | QEMU is a generic and open source processor emulator which achieves a | |
146 | good emulation speed by using dynamic translation. | |
147 | ||
148 | This package provides the system emulator for arm. | |
149 | ||
150 | %package system-cris | |
151 | Summary: QEMU system emulator for cris | |
152 | Group: Development/Tools | |
153 | Requires: %{name}-common = %{version}-%{release} | |
154 | ||
155 | %description system-cris | |
156 | QEMU is a generic and open source processor emulator which achieves a | |
157 | good emulation speed by using dynamic translation. | |
158 | ||
159 | This package provides the system emulator for cris. | |
160 | ||
161 | %package system-lm32 | |
162 | Summary: QEMU system emulator for lm32 | |
163 | Group: Development/Tools | |
164 | Requires: %{name}-common = %{version}-%{release} | |
165 | ||
166 | %description system-lm32 | |
167 | QEMU is a generic and open source processor emulator which achieves a | |
168 | good emulation speed by using dynamic translation. | |
169 | ||
170 | This package provides the system emulator for lm32. | |
171 | ||
172 | %package system-m68k | |
173 | Summary: QEMU system emulator for m68k | |
174 | Group: Development/Tools | |
175 | Requires: %{name}-common = %{version}-%{release} | |
176 | ||
177 | %description system-m68k | |
178 | QEMU is a generic and open source processor emulator which achieves a | |
179 | good emulation speed by using dynamic translation. | |
180 | ||
181 | This package provides the system emulator for m68k. | |
182 | ||
183 | %package system-microblaze | |
184 | Summary: QEMU system emulator for microblaze | |
185 | Group: Development/Tools | |
186 | Requires: %{name}-common = %{version}-%{release} | |
187 | ||
188 | %description system-microblaze | |
189 | QEMU is a generic and open source processor emulator which achieves a | |
190 | good emulation speed by using dynamic translation. | |
191 | ||
192 | This package provides the system emulator for microblaze. | |
193 | ||
194 | %package system-mips | |
195 | Summary: QEMU system emulator for mips | |
196 | Group: Development/Tools | |
197 | Requires: %{name}-common = %{version}-%{release} | |
198 | ||
199 | %description system-mips | |
200 | QEMU is a generic and open source processor emulator which achieves a | |
201 | good emulation speed by using dynamic translation. | |
202 | ||
203 | This package provides the system emulator for mips. | |
204 | ||
205 | %package system-ppc | |
206 | Summary: QEMU system emulator for ppc | |
207 | Group: Development/Tools | |
208 | Requires: %{name}-common = %{version}-%{release} | |
209 | ||
210 | %description system-ppc | |
211 | QEMU is a generic and open source processor emulator which achieves a | |
212 | good emulation speed by using dynamic translation. | |
213 | ||
214 | This package provides the system emulator for ppc. | |
215 | ||
216 | %package system-s390x | |
217 | Summary: QEMU system emulator for s390x | |
218 | Group: Development/Tools | |
219 | Requires: %{name}-common = %{version}-%{release} | |
220 | ||
221 | %description system-s390x | |
222 | QEMU is a generic and open source processor emulator which achieves a | |
223 | good emulation speed by using dynamic translation. | |
224 | ||
225 | This package provides the system emulator for s390x. | |
226 | ||
227 | %package system-sh4 | |
228 | Summary: QEMU system emulator for sh4 | |
229 | Group: Development/Tools | |
230 | Requires: %{name}-common = %{version}-%{release} | |
231 | ||
232 | %description system-sh4 | |
233 | QEMU is a generic and open source processor emulator which achieves a | |
234 | good emulation speed by using dynamic translation. | |
235 | ||
236 | This package provides the system emulator for sh4. | |
237 | ||
238 | %package system-sparc | |
239 | Summary: QEMU system emulator for sparc | |
240 | Group: Development/Tools | |
241 | Requires: %{name}-common = %{version}-%{release} | |
242 | ||
243 | %description system-sparc | |
244 | QEMU is a generic and open source processor emulator which achieves a | |
245 | good emulation speed by using dynamic translation. | |
246 | ||
247 | This package provides the system emulator for sparc/sparc64. | |
248 | ||
249 | %package system-x86 | |
250 | Summary: QEMU system emulator for x86 | |
251 | Group: Development/Tools | |
252 | Requires: %{name}-common = %{version}-%{release} | |
fabf5a9c ER |
253 | |
254 | %description system-x86 | |
255 | QEMU is a generic and open source processor emulator which achieves a | |
256 | good emulation speed by using dynamic translation. | |
257 | ||
258 | This package provides the system emulator for x86. When being run in a | |
259 | x86 machine that supports it, this package also provides the KVM | |
260 | virtualization platform. | |
261 | ||
262 | %package system-xtensa | |
263 | Summary: QEMU system emulator for xtensa | |
264 | Group: Development/Tools | |
265 | Requires: %{name}-common = %{version}-%{release} | |
266 | ||
267 | %description system-xtensa | |
268 | QEMU is a generic and open source processor emulator which achieves a | |
269 | good emulation speed by using dynamic translation. | |
270 | ||
271 | This package provides the system emulator for xtensa. | |
272 | ||
cd19124e | 273 | %prep |
c21a255a | 274 | %setup -q |
3c6e2290 | 275 | %patch0 -p1 |
8d073aaa | 276 | %{?with_nosdlgui:%patch6 -p1} |
7b81d160 | 277 | #patch8 -p1 |
137653c3 | 278 | %patch17 -p0 |
0b920c52 | 279 | |
bd30ad73 GP |
280 | # workaround for conflict with alsa/error.h |
281 | ln -s ../error.h qapi/error.h | |
282 | ||
80bac37e | 283 | %build |
8bd2aee2 | 284 | ./configure \ |
3c6e2290 JR |
285 | --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \ |
286 | --extra-ldflags="%{rpmldflags}" \ | |
697b0ba8 | 287 | --disable-strip \ |
7c0786d1 | 288 | --sysconfdir=%{_sysconfdir} \ |
8bd2aee2 | 289 | --prefix=%{_prefix} \ |
98a1a188 AM |
290 | --cc="%{__cc}" \ |
291 | --host-cc="%{__cc}" \ | |
b99b1652 | 292 | --enable-mixemu \ |
98a1a188 | 293 | --audio-drv-list="alsa" \ |
7b81d160 | 294 | --interp-prefix=%{_libdir}/%{name} |
b74098c4 | 295 | %{__make} V=1 |
cd19124e | 296 | |
297 | %install | |
298 | rm -rf $RPM_BUILD_ROOT | |
5a2da1d0 | 299 | |
cd19124e | 300 | %{__make} install \ |
301 | DESTDIR=$RPM_BUILD_ROOT | |
ac6e5743 | 302 | |
a91fea76 | 303 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
304 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup | |
ac6e5743 | 305 | #!/bin/sh |
a91fea76 | 306 | |
ac6e5743 | 307 | EOF |
a62a2d89 | 308 | |
c33439fc ER |
309 | # already packaged |
310 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html | |
311 | ||
cd19124e | 312 | %clean |
313 | rm -rf $RPM_BUILD_ROOT | |
314 | ||
315 | %files | |
316 | %defattr(644,root,root,755) | |
fabf5a9c ER |
317 | |
318 | %files common | |
319 | %defattr(644,root,root,755) | |
867764ba | 320 | %doc README qemu-doc.html qemu-tech.html |
a91fea76 | 321 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup |
fabf5a9c | 322 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf |
7c0786d1 | 323 | %dir %{_sysconfdir}/qemu |
fabf5a9c | 324 | %attr(755,root,root) %{_bindir}/qemu-nbd |
cd19124e | 325 | %{_mandir}/man1/qemu.1* |
98a1a188 | 326 | %{_mandir}/man8/qemu-nbd.8* |
fabf5a9c ER |
327 | |
328 | %dir %{_datadir}/qemu | |
3d0e0752 | 329 | %{_datadir}/%{name}/cpus-*.conf |
fabf5a9c ER |
330 | %{_datadir}/%{name}/keymaps |
331 | # various bios images | |
332 | %{_datadir}/%{name}/*.bin | |
333 | %{_datadir}/%{name}/*.rom | |
334 | %{_datadir}/%{name}/*.dtb | |
335 | %{_datadir}/%{name}/openbios-ppc | |
336 | %{_datadir}/%{name}/openbios-sparc* | |
337 | %{_datadir}/%{name}/palcode-clipper | |
338 | ||
339 | %files img | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_bindir}/qemu-img | |
342 | %{_mandir}/man1/qemu-img.1* | |
343 | ||
344 | %files user | |
345 | %defattr(644,root,root,755) | |
346 | %attr(755,root,root) %{_bindir}/qemu-x86_64 | |
347 | %attr(755,root,root) %{_bindir}/qemu-i386 | |
348 | %attr(755,root,root) %{_bindir}/qemu-alpha | |
349 | %attr(755,root,root) %{_bindir}/qemu-arm | |
350 | %attr(755,root,root) %{_bindir}/qemu-armeb | |
351 | %attr(755,root,root) %{_bindir}/qemu-cris | |
352 | %attr(755,root,root) %{_bindir}/qemu-ga | |
353 | %attr(755,root,root) %{_bindir}/qemu-io | |
354 | %attr(755,root,root) %{_bindir}/qemu-m68k | |
355 | %attr(755,root,root) %{_bindir}/qemu-microblaze | |
356 | %attr(755,root,root) %{_bindir}/qemu-microblazeel | |
357 | %attr(755,root,root) %{_bindir}/qemu-mips | |
358 | %attr(755,root,root) %{_bindir}/qemu-mipsel | |
359 | %attr(755,root,root) %{_bindir}/qemu-ppc | |
360 | %attr(755,root,root) %{_bindir}/qemu-ppc64 | |
361 | %attr(755,root,root) %{_bindir}/qemu-ppc64abi32 | |
362 | %attr(755,root,root) %{_bindir}/qemu-s390x | |
363 | %attr(755,root,root) %{_bindir}/qemu-sh4 | |
364 | %attr(755,root,root) %{_bindir}/qemu-sh4eb | |
365 | %attr(755,root,root) %{_bindir}/qemu-sparc | |
366 | %attr(755,root,root) %{_bindir}/qemu-sparc32plus | |
367 | %attr(755,root,root) %{_bindir}/qemu-sparc64 | |
368 | %attr(755,root,root) %{_bindir}/qemu-unicore32 | |
369 | ||
370 | %files system-alpha | |
371 | %defattr(644,root,root,755) | |
372 | %attr(755,root,root) %{_bindir}/qemu-system-alpha | |
373 | ||
374 | %files system-arm | |
375 | %defattr(644,root,root,755) | |
376 | %attr(755,root,root) %{_bindir}/qemu-system-arm | |
377 | ||
378 | %files system-cris | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_bindir}/qemu-system-cris | |
381 | ||
382 | %files system-lm32 | |
383 | %defattr(644,root,root,755) | |
384 | %attr(755,root,root) %{_bindir}/qemu-system-lm32 | |
385 | ||
386 | %files system-m68k | |
387 | %defattr(644,root,root,755) | |
388 | %attr(755,root,root) %{_bindir}/qemu-system-m68k | |
389 | ||
390 | %files system-microblaze | |
391 | %defattr(644,root,root,755) | |
392 | %attr(755,root,root) %{_bindir}/qemu-system-microblaze | |
393 | %attr(755,root,root) %{_bindir}/qemu-system-microblazeel | |
394 | ||
395 | %files system-mips | |
396 | %defattr(644,root,root,755) | |
397 | %attr(755,root,root) %{_bindir}/qemu-system-mips | |
398 | %attr(755,root,root) %{_bindir}/qemu-system-mipsel | |
399 | %attr(755,root,root) %{_bindir}/qemu-system-mips64 | |
400 | %attr(755,root,root) %{_bindir}/qemu-system-mips64el | |
401 | ||
402 | %files system-ppc | |
403 | %defattr(644,root,root,755) | |
404 | %attr(755,root,root) %{_bindir}/qemu-system-ppc | |
405 | %attr(755,root,root) %{_bindir}/qemu-system-ppc64 | |
406 | %attr(755,root,root) %{_bindir}/qemu-system-ppcemb | |
407 | ||
408 | %files system-s390x | |
409 | %defattr(644,root,root,755) | |
410 | %attr(755,root,root) %{_bindir}/qemu-system-s390x | |
411 | ||
412 | %files system-sh4 | |
413 | %defattr(644,root,root,755) | |
414 | %attr(755,root,root) %{_bindir}/qemu-system-sh4 | |
415 | %attr(755,root,root) %{_bindir}/qemu-system-sh4eb | |
416 | ||
417 | %files system-sparc | |
418 | %defattr(644,root,root,755) | |
419 | %attr(755,root,root) %{_bindir}/qemu-system-sparc | |
420 | %attr(755,root,root) %{_bindir}/qemu-system-sparc64 | |
421 | ||
422 | %files system-x86 | |
423 | %defattr(644,root,root,755) | |
424 | %attr(755,root,root) %{_bindir}/qemu-system-i386 | |
425 | %attr(755,root,root) %{_bindir}/qemu-system-x86_64 | |
426 | ||
427 | %files system-xtensa | |
428 | %defattr(644,root,root,755) | |
429 | %attr(755,root,root) %{_bindir}/qemu-system-xtensa | |
430 | %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb |