]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
- package omitted files
[packages/qemu.git] / qemu.spec
1 # TODO:
2 # - update patches
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
9 #
10 # Conditional build:
11 %bcond_with     nosdlgui                # do not use SDL gui (use X11 instead)
12
13 Summary:        QEMU CPU Emulator
14 Summary(pl.UTF-8):      QEMU - emulator procesora
15 Name:           qemu
16 Version:        1.2.0
17 Release:        3
18 License:        GPL
19 Group:          Applications/Emulators
20 Source0:        http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2
21 # Source0-md5:  78eb1e984f4532aa9f2bdd3c127b5b61
22 Patch0:         %{name}-cflags.patch
23 Patch1:         vgabios-widescreens.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
40 BuildRequires:  which
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-or32 = %{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-unicore32 = %{version}-%{release}
57 Requires:       %{name}-system-x86 = %{version}-%{release}
58 Requires:       %{name}-system-xtensa = %{version}-%{release}
59 Requires:       %{name}-user = %{version}-%{release}
60 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
61 ExclusiveArch:  %{ix86} %{x8664} %{?with_userspace:ppc}
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 # some PPC/SPARC boot image in ELF format
65 %define         _noautostrip    .*%{_datadir}/qemu/.*-.*
66
67 %description
68 QEMU is a FAST! processor emulator. By using dynamic translation it
69 achieves a reasonnable speed while being easy to port on new host
70 CPUs. QEMU has two operating modes:
71
72 - User mode emulation. In this mode, QEMU can launch Linux processes
73   compiled for one CPU on another CPU. Linux system calls are converted
74   because of endianness and 32/64 bit mismatches. Wine (Windows
75   emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
76
77 - Full system emulation. In this mode, QEMU emulates a full system,
78   including a processor and various peripherials. It can also be used to
79   provide virtual hosting of several virtual PC on a single server.
80
81 %description -l pl.UTF-8
82 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
83 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
84 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
85
86 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
87   procesy linuksowe skompilowane dla jednego procesora na innym
88   procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
89   niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
90   słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
91   cele QEMU.
92
93 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
94   włączając w to procesor i różne urządzenia peryferyjne. Może być także
95   używane do wirtualnego hostowania kilku wirtualnych pecetów na
96   pojedynczym serwerze.
97
98 %package  common
99 Summary:        QEMU common files needed by all QEMU targets
100 Group:          Development/Tools
101 Requires:       SDL >= 1.2.1
102 Conflicts:      qemu < 1.0-2
103
104 %description common
105 QEMU is a generic and open source processor emulator which achieves a
106 good emulation speed by using dynamic translation.
107
108 This package provides the common files needed by all QEMU targets.
109
110 %package  img
111 Summary:        QEMU command line tool for manipulating disk images
112 Group:          Development/Tools
113 Conflicts:      qemu < 1.0-2
114
115 %description img
116 This package provides a command line tool for manipulating disk images
117
118 %package user
119 Summary:        QEMU user mode emulation of qemu targets
120 Group:          Development/Tools
121 Requires:       %{name}-common = %{version}-%{release}
122
123 %description user
124 QEMU is a generic and open source processor emulator which achieves a
125 good emulation speed by using dynamic translation.
126
127 This package provides the user mode emulation of QEMU targets.
128
129 %package system-alpha
130 Summary:        QEMU system emulator for alpha
131 Group:          Development/Tools
132 Requires:       %{name}-common = %{version}-%{release}
133
134 %description system-alpha
135 QEMU is a generic and open source processor emulator which achieves a
136 good emulation speed by using dynamic translation.
137
138 This package provides the system emulator for alpha.
139
140 %package system-arm
141 Summary:        QEMU system emulator for arm
142 Group:          Development/Tools
143 Requires:       %{name}-common = %{version}-%{release}
144
145 %description system-arm
146 QEMU is a generic and open source processor emulator which achieves a
147 good emulation speed by using dynamic translation.
148
149 This package provides the system emulator for arm.
150
151 %package system-cris
152 Summary:        QEMU system emulator for cris
153 Group:          Development/Tools
154 Requires:       %{name}-common = %{version}-%{release}
155
156 %description system-cris
157 QEMU is a generic and open source processor emulator which achieves a
158 good emulation speed by using dynamic translation.
159
160 This package provides the system emulator for cris.
161
162 %package system-lm32
163 Summary:        QEMU system emulator for lm32
164 Group:          Development/Tools
165 Requires:       %{name}-common = %{version}-%{release}
166
167 %description system-lm32
168 QEMU is a generic and open source processor emulator which achieves a
169 good emulation speed by using dynamic translation.
170
171 This package provides the system emulator for lm32.
172
173 %package system-m68k
174 Summary:        QEMU system emulator for m68k
175 Group:          Development/Tools
176 Requires:       %{name}-common = %{version}-%{release}
177
178 %description system-m68k
179 QEMU is a generic and open source processor emulator which achieves a
180 good emulation speed by using dynamic translation.
181
182 This package provides the system emulator for m68k.
183
184 %package system-microblaze
185 Summary:        QEMU system emulator for microblaze
186 Group:          Development/Tools
187 Requires:       %{name}-common = %{version}-%{release}
188
189 %description system-microblaze
190 QEMU is a generic and open source processor emulator which achieves a
191 good emulation speed by using dynamic translation.
192
193 This package provides the system emulator for microblaze.
194
195 %package system-mips
196 Summary:        QEMU system emulator for mips
197 Group:          Development/Tools
198 Requires:       %{name}-common = %{version}-%{release}
199
200 %description system-mips
201 QEMU is a generic and open source processor emulator which achieves a
202 good emulation speed by using dynamic translation.
203
204 This package provides the system emulator for mips.
205
206 %package system-or32
207 Summary:        QEMU system emulator for or32
208 Group:          Development/Tools
209 Requires:       %{name}-common = %{version}-%{release}
210
211 %description system-or32
212 QEMU is a generic and open source processor emulator which achieves a
213 good emulation speed by using dynamic translation.
214
215 This package provides the system emulator for or32.
216
217 %package system-ppc
218 Summary:        QEMU system emulator for ppc
219 Group:          Development/Tools
220 Requires:       %{name}-common = %{version}-%{release}
221
222 %description system-ppc
223 QEMU is a generic and open source processor emulator which achieves a
224 good emulation speed by using dynamic translation.
225
226 This package provides the system emulator for ppc.
227
228 %package system-s390x
229 Summary:        QEMU system emulator for s390x
230 Group:          Development/Tools
231 Requires:       %{name}-common = %{version}-%{release}
232
233 %description system-s390x
234 QEMU is a generic and open source processor emulator which achieves a
235 good emulation speed by using dynamic translation.
236
237 This package provides the system emulator for s390x.
238
239 %package system-sh4
240 Summary:        QEMU system emulator for sh4
241 Group:          Development/Tools
242 Requires:       %{name}-common = %{version}-%{release}
243
244 %description system-sh4
245 QEMU is a generic and open source processor emulator which achieves a
246 good emulation speed by using dynamic translation.
247
248 This package provides the system emulator for sh4.
249
250 %package system-sparc
251 Summary:        QEMU system emulator for sparc
252 Group:          Development/Tools
253 Requires:       %{name}-common = %{version}-%{release}
254
255 %description system-sparc
256 QEMU is a generic and open source processor emulator which achieves a
257 good emulation speed by using dynamic translation.
258
259 This package provides the system emulator for sparc/sparc64.
260
261 %package system-unicore32
262 Summary:        QEMU system emulator for unicore32
263 Group:          Development/Tools
264 Requires:       %{name}-common = %{version}-%{release}
265
266 %description system-unicore32
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 unicore32.
271
272 %package system-x86
273 Summary:        QEMU system emulator for x86
274 Group:          Development/Tools
275 Requires:       %{name}-common = %{version}-%{release}
276
277 %description system-x86
278 QEMU is a generic and open source processor emulator which achieves a
279 good emulation speed by using dynamic translation.
280
281 This package provides the system emulator for x86. When being run in a
282 x86 machine that supports it, this package also provides the KVM
283 virtualization platform.
284
285 %package system-xtensa
286 Summary:        QEMU system emulator for xtensa
287 Group:          Development/Tools
288 Requires:       %{name}-common = %{version}-%{release}
289
290 %description system-xtensa
291 QEMU is a generic and open source processor emulator which achieves a
292 good emulation speed by using dynamic translation.
293
294 This package provides the system emulator for xtensa.
295
296 %prep
297 %setup -q
298 %patch0 -p1
299 %patch1 -p1
300 %{?with_nosdlgui:%patch6 -p1}
301 #patch8 -p1
302 %patch17 -p0
303
304 # workaround for conflict with alsa/error.h
305 ln -s ../error.h qapi/error.h
306
307 %build
308 ./configure \
309         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
310         --extra-ldflags="%{rpmldflags}" \
311         --sysconfdir=%{_sysconfdir} \
312         --prefix=%{_prefix} \
313         --cc="%{__cc}" \
314         --host-cc="%{__cc}" \
315         --disable-strip \
316         --enable-mixemu \
317         --audio-drv-list="alsa" \
318         --interp-prefix=%{_libdir}/%{name}
319 # note: CONFIG_QEMU_HELPERDIR is used when compiling, libexecdir when installing;
320 # --libexecdir in configure is nop
321 %{__make} \
322         V=1 \
323         CONFIG_QEMU_HELPERDIR="%{_libdir}"
324
325 # rebuild patched vesa tables with additional widescreen modes.
326 %{__make} -C roms/vgabios stdvga-bios
327
328 %install
329 rm -rf $RPM_BUILD_ROOT
330
331 %{__make} install \
332         DESTDIR=$RPM_BUILD_ROOT \
333         libexecdir=%{_libdir}
334
335 install -d $RPM_BUILD_ROOT%{_sysconfdir}
336 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
337 #!/bin/sh
338
339 EOF
340
341 # already packaged
342 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
343 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qmp-commands.txt
344
345 # install patched vesa tables with additional widescreen modes.
346 install -m 644 roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/vgabios-stdvga.bin
347
348 %clean
349 rm -rf $RPM_BUILD_ROOT
350
351 %files
352 %defattr(644,root,root,755)
353
354 %files common
355 %defattr(644,root,root,755)
356 %doc README qemu-doc.html qemu-tech.html QMP/qmp-commands.txt
357 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
358 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
359 %dir %{_sysconfdir}/qemu
360 %attr(755,root,root) %{_bindir}/virtfs-proxy-helper
361 %attr(755,root,root) %{_bindir}/vscclient
362 %attr(755,root,root) %{_bindir}/qemu-nbd
363 %attr(755,root,root) %{_libdir}/qemu-bridge-helper
364 %{_mandir}/man1/qemu.1*
365 %{_mandir}/man1/virtfs-proxy-helper.1*
366 %{_mandir}/man8/qemu-nbd.8*
367
368 %dir %{_datadir}/qemu
369 %{_datadir}/%{name}/cpus-*.conf
370 %{_datadir}/%{name}/keymaps
371 %{_datadir}/%{name}/qemu-icon.bmp
372 # various bios images
373 %{_datadir}/%{name}/*.bin
374 %{_datadir}/%{name}/*.rom
375 %{_datadir}/%{name}/*.dtb
376 %{_datadir}/%{name}/openbios-ppc
377 %{_datadir}/%{name}/openbios-sparc*
378 %{_datadir}/%{name}/palcode-clipper
379
380 %files img
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_bindir}/qemu-img
383 %{_mandir}/man1/qemu-img.1*
384
385 %files user
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/qemu-x86_64
388 %attr(755,root,root) %{_bindir}/qemu-i386
389 %attr(755,root,root) %{_bindir}/qemu-alpha
390 %attr(755,root,root) %{_bindir}/qemu-arm
391 %attr(755,root,root) %{_bindir}/qemu-armeb
392 %attr(755,root,root) %{_bindir}/qemu-cris
393 %attr(755,root,root) %{_bindir}/qemu-ga
394 %attr(755,root,root) %{_bindir}/qemu-io
395 %attr(755,root,root) %{_bindir}/qemu-m68k
396 %attr(755,root,root) %{_bindir}/qemu-microblaze
397 %attr(755,root,root) %{_bindir}/qemu-microblazeel
398 %attr(755,root,root) %{_bindir}/qemu-mips
399 %attr(755,root,root) %{_bindir}/qemu-mipsel
400 %attr(755,root,root) %{_bindir}/qemu-or32
401 %attr(755,root,root) %{_bindir}/qemu-ppc
402 %attr(755,root,root) %{_bindir}/qemu-ppc64
403 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
404 %attr(755,root,root) %{_bindir}/qemu-s390x
405 %attr(755,root,root) %{_bindir}/qemu-sh4
406 %attr(755,root,root) %{_bindir}/qemu-sh4eb
407 %attr(755,root,root) %{_bindir}/qemu-sparc
408 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
409 %attr(755,root,root) %{_bindir}/qemu-sparc64
410 %attr(755,root,root) %{_bindir}/qemu-unicore32
411
412 %files system-alpha
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_bindir}/qemu-system-alpha
415
416 %files system-arm
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_bindir}/qemu-system-arm
419
420 %files system-cris
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_bindir}/qemu-system-cris
423
424 %files system-lm32
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_bindir}/qemu-system-lm32
427
428 %files system-m68k
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_bindir}/qemu-system-m68k
431
432 %files system-microblaze
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
435 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
436
437 %files system-mips
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_bindir}/qemu-system-mips
440 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
441 %attr(755,root,root) %{_bindir}/qemu-system-mips64
442 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
443
444 %files system-or32
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_bindir}/qemu-system-or32
447
448 %files system-ppc
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/qemu-system-ppc
451 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
452 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
453
454 %files system-s390x
455 %defattr(644,root,root,755)
456 %attr(755,root,root) %{_bindir}/qemu-system-s390x
457
458 %files system-sh4
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_bindir}/qemu-system-sh4
461 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
462
463 %files system-sparc
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/qemu-system-sparc
466 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
467
468 %files system-unicore32
469 %defattr(644,root,root,755)
470 %attr(755,root,root) %{_bindir}/qemu-system-unicore32
471
472 %files system-x86
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/qemu-system-i386
475 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
476
477 %files system-xtensa
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
480 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb
This page took 0.053467 seconds and 4 git commands to generate.