]>
Commit | Line | Data |
---|---|---|
0b920c52 | 1 | # TODO: |
3d0e0752 | 2 | # - package virtfs-proxy-helper, qemu-bridge-helper. |
98a1a188 | 3 | # - update patches |
01b9430c | 4 | # - qemu-system-ppc -hda ac-ppc.img says: |
fabf5a9c | 5 | # qemu: could not open disk image ac-ppc.img: error "Success" |
01b9430c | 6 | # qemu-0.12.2-2.x86_64.rpm - broken |
cef095a4 | 7 | # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init" |
fabf5a9c ER |
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 | |
0b920c52 | 10 | # |
6aef4654 | 11 | # Conditional build: |
a6d3659e | 12 | %bcond_with nosdlgui # do not use SDL gui (use X11 instead) |
007877cb | 13 | |
cd19124e | 14 | Summary: QEMU CPU Emulator |
eec0535a | 15 | Summary(pl.UTF-8): QEMU - emulator procesora |
7b81d160 | 16 | Name: qemu |
3d0e0752 | 17 | Version: 1.1.0 |
ad857655 | 18 | Release: 1 |
5a2da1d0 JB |
19 | License: GPL |
20 | Group: Applications/Emulators | |
3d0e0752 PS |
21 | Source0: http://wiki.qemu.org/download/%{name}-%{version}-1.tar.bz2 |
22 | # Source0-md5: f5c85c229b780bc39268845b6f365fc1 | |
3c6e2290 | 23 | Patch0: qemu-cflags.patch |
7b81d160 | 24 | Patch6: %{name}-nosdlgui.patch |
81a493f2 | 25 | # Proof of concept, for reference, do not remove |
7b81d160 | 26 | Patch8: %{name}-kde_virtual_workspaces_hack.patch |
ba4329df | 27 | Patch17: %{name}-whitelist.patch |
d6bd22e9 | 28 | URL: http://wiki.qemu.org/Index.html |
867764ba | 29 | BuildRequires: SDL-devel >= 1.2.1 |
b0b3ca8d | 30 | BuildRequires: alsa-lib-devel |
b99b1652 AM |
31 | BuildRequires: bluez-libs-devel |
32 | BuildRequires: gnutls-devel | |
98a1a188 | 33 | BuildRequires: ncurses-devel |
995bac8b | 34 | BuildRequires: perl-Encode |
2fb8ea02 | 35 | BuildRequires: perl-tools-pod |
ba84a935 | 36 | BuildRequires: pkgconfig |
8bb1261c | 37 | BuildRequires: sed >= 4.0 |
a1146336 | 38 | BuildRequires: texi2html |
22f71ecb | 39 | BuildRequires: texinfo |
cad677a4 | 40 | BuildRequires: which |
3d0e0752 | 41 | BuildRequires: xen-devel |
ba84a935 | 42 | BuildRequires: xorg-lib-libX11-devel |
fabf5a9c ER |
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} | |
2ef13cb9 | 58 | # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c) |
007877cb | 59 | ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc} |
cd19124e | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
98a1a188 | 62 | # some PPC/SPARC boot image in ELF format |
22f71ecb | 63 | %define _noautostrip .*%{_datadir}/qemu/.*-.* |
a154aede | 64 | |
cd19124e | 65 | %description |
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: | |
69 | ||
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. | |
74 | ||
75 | - Full system emulation. In this mode, QEMU emulates a full system, | |
8799423b ER |
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. | |
cd19124e | 78 | |
27b30e9c JR |
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: | |
5a2da1d0 | 83 | |
27b30e9c | 84 | - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać |
5a2da1d0 | 85 | procesy linuksowe skompilowane dla jednego procesora na innym |
27b30e9c JR |
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 | |
5a2da1d0 JB |
89 | cele QEMU. |
90 | ||
27b30e9c JR |
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 | |
8799423b | 94 | pojedynczym serwerze. |
5a2da1d0 | 95 | |
fabf5a9c ER |
96 | %package common |
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 | |
101 | ||
102 | %description common | |
103 | QEMU is a generic and open source processor emulator which achieves a | |
104 | good emulation speed by using dynamic translation. | |
105 | ||
106 | This package provides the common files needed by all QEMU targets. | |
107 | ||
108 | %package img | |
109 | Summary: QEMU command line tool for manipulating disk images | |
110 | Group: Development/Tools | |
111 | Conflicts: qemu < 1.0-2 | |
112 | ||
113 | %description img | |
114 | This package provides a command line tool for manipulating disk images | |
115 | ||
116 | %package user | |
117 | Summary: QEMU user mode emulation of qemu targets | |
118 | Group: Development/Tools | |
119 | Requires: %{name}-common = %{version}-%{release} | |
120 | ||
121 | %description user | |
122 | QEMU is a generic and open source processor emulator which achieves a | |
123 | good emulation speed by using dynamic translation. | |
124 | ||
125 | This package provides the user mode emulation of QEMU targets. | |
126 | ||
127 | %package system-alpha | |
128 | Summary: QEMU system emulator for alpha | |
129 | Group: Development/Tools | |
130 | Requires: %{name}-common = %{version}-%{release} | |
131 | ||
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. | |
135 | ||
136 | This package provides the system emulator for alpha. | |
137 | ||
138 | %package system-arm | |
139 | Summary: QEMU system emulator for arm | |
140 | Group: Development/Tools | |
141 | Requires: %{name}-common = %{version}-%{release} | |
142 | ||
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. | |
146 | ||
147 | This package provides the system emulator for arm. | |
148 | ||
149 | %package system-cris | |
150 | Summary: QEMU system emulator for cris | |
151 | Group: Development/Tools | |
152 | Requires: %{name}-common = %{version}-%{release} | |
153 | ||
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. | |
157 | ||
158 | This package provides the system emulator for cris. | |
159 | ||
160 | %package system-lm32 | |
161 | Summary: QEMU system emulator for lm32 | |
162 | Group: Development/Tools | |
163 | Requires: %{name}-common = %{version}-%{release} | |
164 | ||
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. | |
168 | ||
169 | This package provides the system emulator for lm32. | |
170 | ||
171 | %package system-m68k | |
172 | Summary: QEMU system emulator for m68k | |
173 | Group: Development/Tools | |
174 | Requires: %{name}-common = %{version}-%{release} | |
175 | ||
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. | |
179 | ||
180 | This package provides the system emulator for m68k. | |
181 | ||
182 | %package system-microblaze | |
183 | Summary: QEMU system emulator for microblaze | |
184 | Group: Development/Tools | |
185 | Requires: %{name}-common = %{version}-%{release} | |
186 | ||
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. | |
190 | ||
191 | This package provides the system emulator for microblaze. | |
192 | ||
193 | %package system-mips | |
194 | Summary: QEMU system emulator for mips | |
195 | Group: Development/Tools | |
196 | Requires: %{name}-common = %{version}-%{release} | |
197 | ||
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. | |
201 | ||
202 | This package provides the system emulator for mips. | |
203 | ||
204 | %package system-ppc | |
205 | Summary: QEMU system emulator for ppc | |
206 | Group: Development/Tools | |
207 | Requires: %{name}-common = %{version}-%{release} | |
208 | ||
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. | |
212 | ||
213 | This package provides the system emulator for ppc. | |
214 | ||
215 | %package system-s390x | |
216 | Summary: QEMU system emulator for s390x | |
217 | Group: Development/Tools | |
218 | Requires: %{name}-common = %{version}-%{release} | |
219 | ||
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. | |
223 | ||
224 | This package provides the system emulator for s390x. | |
225 | ||
226 | %package system-sh4 | |
227 | Summary: QEMU system emulator for sh4 | |
228 | Group: Development/Tools | |
229 | Requires: %{name}-common = %{version}-%{release} | |
230 | ||
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. | |
234 | ||
235 | This package provides the system emulator for sh4. | |
236 | ||
237 | %package system-sparc | |
238 | Summary: QEMU system emulator for sparc | |
239 | Group: Development/Tools | |
240 | Requires: %{name}-common = %{version}-%{release} | |
241 | ||
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. | |
245 | ||
246 | This package provides the system emulator for sparc/sparc64. | |
247 | ||
248 | %package system-x86 | |
249 | Summary: QEMU system emulator for x86 | |
250 | Group: Development/Tools | |
251 | Requires: %{name}-common = %{version}-%{release} | |
fabf5a9c ER |
252 | |
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. | |
256 | ||
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. | |
260 | ||
261 | %package system-xtensa | |
262 | Summary: QEMU system emulator for xtensa | |
263 | Group: Development/Tools | |
264 | Requires: %{name}-common = %{version}-%{release} | |
265 | ||
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. | |
269 | ||
270 | This package provides the system emulator for xtensa. | |
271 | ||
cd19124e | 272 | %prep |
c21a255a | 273 | %setup -q |
3c6e2290 | 274 | %patch0 -p1 |
8d073aaa | 275 | %{?with_nosdlgui:%patch6 -p1} |
7b81d160 | 276 | #patch8 -p1 |
137653c3 | 277 | %patch17 -p0 |
0b920c52 | 278 | |
bd30ad73 GP |
279 | # workaround for conflict with alsa/error.h |
280 | ln -s ../error.h qapi/error.h | |
281 | ||
80bac37e | 282 | %build |
8bd2aee2 | 283 | ./configure \ |
3c6e2290 JR |
284 | --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \ |
285 | --extra-ldflags="%{rpmldflags}" \ | |
7c0786d1 | 286 | --sysconfdir=%{_sysconfdir} \ |
8bd2aee2 | 287 | --prefix=%{_prefix} \ |
98a1a188 AM |
288 | --cc="%{__cc}" \ |
289 | --host-cc="%{__cc}" \ | |
b99b1652 | 290 | --enable-mixemu \ |
98a1a188 | 291 | --audio-drv-list="alsa" \ |
7b81d160 | 292 | --interp-prefix=%{_libdir}/%{name} |
b74098c4 | 293 | %{__make} V=1 |
cd19124e | 294 | |
295 | %install | |
296 | rm -rf $RPM_BUILD_ROOT | |
5a2da1d0 | 297 | |
cd19124e | 298 | %{__make} install \ |
299 | DESTDIR=$RPM_BUILD_ROOT | |
ac6e5743 | 300 | |
a91fea76 | 301 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
302 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup | |
ac6e5743 | 303 | #!/bin/sh |
a91fea76 | 304 | |
ac6e5743 | 305 | EOF |
a62a2d89 | 306 | |
c33439fc ER |
307 | # already packaged |
308 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html | |
309 | ||
cd19124e | 310 | %clean |
311 | rm -rf $RPM_BUILD_ROOT | |
312 | ||
313 | %files | |
314 | %defattr(644,root,root,755) | |
fabf5a9c ER |
315 | |
316 | %files common | |
317 | %defattr(644,root,root,755) | |
867764ba | 318 | %doc README qemu-doc.html qemu-tech.html |
a91fea76 | 319 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup |
fabf5a9c | 320 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf |
7c0786d1 | 321 | %dir %{_sysconfdir}/qemu |
fabf5a9c | 322 | %attr(755,root,root) %{_bindir}/qemu-nbd |
cd19124e | 323 | %{_mandir}/man1/qemu.1* |
98a1a188 | 324 | %{_mandir}/man8/qemu-nbd.8* |
fabf5a9c ER |
325 | |
326 | %dir %{_datadir}/qemu | |
3d0e0752 | 327 | %{_datadir}/%{name}/cpus-*.conf |
fabf5a9c ER |
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 | |
336 | ||
337 | %files img | |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_bindir}/qemu-img | |
340 | %{_mandir}/man1/qemu-img.1* | |
341 | ||
342 | %files user | |
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 | |
367 | ||
368 | %files system-alpha | |
369 | %defattr(644,root,root,755) | |
370 | %attr(755,root,root) %{_bindir}/qemu-system-alpha | |
371 | ||
372 | %files system-arm | |
373 | %defattr(644,root,root,755) | |
374 | %attr(755,root,root) %{_bindir}/qemu-system-arm | |
375 | ||
376 | %files system-cris | |
377 | %defattr(644,root,root,755) | |
378 | %attr(755,root,root) %{_bindir}/qemu-system-cris | |
379 | ||
380 | %files system-lm32 | |
381 | %defattr(644,root,root,755) | |
382 | %attr(755,root,root) %{_bindir}/qemu-system-lm32 | |
383 | ||
384 | %files system-m68k | |
385 | %defattr(644,root,root,755) | |
386 | %attr(755,root,root) %{_bindir}/qemu-system-m68k | |
387 | ||
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 | |
392 | ||
393 | %files system-mips | |
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 | |
399 | ||
400 | %files system-ppc | |
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 | |
405 | ||
406 | %files system-s390x | |
407 | %defattr(644,root,root,755) | |
408 | %attr(755,root,root) %{_bindir}/qemu-system-s390x | |
409 | ||
410 | %files system-sh4 | |
411 | %defattr(644,root,root,755) | |
412 | %attr(755,root,root) %{_bindir}/qemu-system-sh4 | |
413 | %attr(755,root,root) %{_bindir}/qemu-system-sh4eb | |
414 | ||
415 | %files system-sparc | |
416 | %defattr(644,root,root,755) | |
417 | %attr(755,root,root) %{_bindir}/qemu-system-sparc | |
418 | %attr(755,root,root) %{_bindir}/qemu-system-sparc64 | |
419 | ||
420 | %files system-x86 | |
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 | |
424 | ||
425 | %files system-xtensa | |
426 | %defattr(644,root,root,755) | |
427 | %attr(755,root,root) %{_bindir}/qemu-system-xtensa | |
428 | %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb |