]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
updated to 1.2.0.
[packages/qemu.git] / qemu.spec
1 # TODO:
2 # - package virtfs-proxy-helper, qemu-bridge-helper.
3 # - package qemu-system-or32
4 # - update patches
5 # - qemu-system-ppc -hda ac-ppc.img says:
6 #   qemu: could not open disk image ac-ppc.img: error "Success"
7 #   qemu-0.12.2-2.x86_64.rpm - broken
8 #   qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
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
11 #
12 # Conditional build:
13 %bcond_with     nosdlgui                # do not use SDL gui (use X11 instead)
14
15 Summary:        QEMU CPU Emulator
16 Summary(pl.UTF-8):      QEMU - emulator procesora
17 Name:           qemu
18 Version:        1.2.0
19 Release:        1
20 License:        GPL
21 Group:          Applications/Emulators
22 Source0:        http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2
23 # Source0-md5:  78eb1e984f4532aa9f2bdd3c127b5b61
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-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)
61
62 # some PPC/SPARC boot image in ELF format
63 %define         _noautostrip    .*%{_datadir}/qemu/.*-.*
64
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,
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.
78
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:
83
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
89   cele QEMU.
90
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
94   pojedynczym serwerze.
95
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}
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
272 %prep
273 %setup -q
274 %patch0 -p1
275 %{?with_nosdlgui:%patch6 -p1}
276 #patch8 -p1
277 %patch17 -p0
278
279 # workaround for conflict with alsa/error.h
280 ln -s ../error.h qapi/error.h
281
282 %build
283 ./configure \
284         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
285         --extra-ldflags="%{rpmldflags}" \
286         --disable-strip \
287         --sysconfdir=%{_sysconfdir} \
288         --prefix=%{_prefix} \
289         --cc="%{__cc}" \
290         --host-cc="%{__cc}" \
291         --enable-mixemu \
292         --audio-drv-list="alsa" \
293         --interp-prefix=%{_libdir}/%{name}
294 %{__make} V=1
295
296 %install
297 rm -rf $RPM_BUILD_ROOT
298
299 %{__make} install \
300         DESTDIR=$RPM_BUILD_ROOT
301
302 install -d $RPM_BUILD_ROOT%{_sysconfdir}
303 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
304 #!/bin/sh
305
306 EOF
307
308 # already packaged
309 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
310
311 %clean
312 rm -rf $RPM_BUILD_ROOT
313
314 %files
315 %defattr(644,root,root,755)
316
317 %files common
318 %defattr(644,root,root,755)
319 %doc README qemu-doc.html qemu-tech.html
320 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
321 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
322 %dir %{_sysconfdir}/qemu
323 %attr(755,root,root) %{_bindir}/qemu-nbd
324 %{_mandir}/man1/qemu.1*
325 %{_mandir}/man8/qemu-nbd.8*
326
327 %dir %{_datadir}/qemu
328 %{_datadir}/%{name}/cpus-*.conf
329 %{_datadir}/%{name}/keymaps
330 # various bios images
331 %{_datadir}/%{name}/*.bin
332 %{_datadir}/%{name}/*.rom
333 %{_datadir}/%{name}/*.dtb
334 %{_datadir}/%{name}/openbios-ppc
335 %{_datadir}/%{name}/openbios-sparc*
336 %{_datadir}/%{name}/palcode-clipper
337
338 %files img
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_bindir}/qemu-img
341 %{_mandir}/man1/qemu-img.1*
342
343 %files user
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_bindir}/qemu-x86_64
346 %attr(755,root,root) %{_bindir}/qemu-i386
347 %attr(755,root,root) %{_bindir}/qemu-alpha
348 %attr(755,root,root) %{_bindir}/qemu-arm
349 %attr(755,root,root) %{_bindir}/qemu-armeb
350 %attr(755,root,root) %{_bindir}/qemu-cris
351 %attr(755,root,root) %{_bindir}/qemu-ga
352 %attr(755,root,root) %{_bindir}/qemu-io
353 %attr(755,root,root) %{_bindir}/qemu-m68k
354 %attr(755,root,root) %{_bindir}/qemu-microblaze
355 %attr(755,root,root) %{_bindir}/qemu-microblazeel
356 %attr(755,root,root) %{_bindir}/qemu-mips
357 %attr(755,root,root) %{_bindir}/qemu-mipsel
358 %attr(755,root,root) %{_bindir}/qemu-ppc
359 %attr(755,root,root) %{_bindir}/qemu-ppc64
360 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
361 %attr(755,root,root) %{_bindir}/qemu-s390x
362 %attr(755,root,root) %{_bindir}/qemu-sh4
363 %attr(755,root,root) %{_bindir}/qemu-sh4eb
364 %attr(755,root,root) %{_bindir}/qemu-sparc
365 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
366 %attr(755,root,root) %{_bindir}/qemu-sparc64
367 %attr(755,root,root) %{_bindir}/qemu-unicore32
368
369 %files system-alpha
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_bindir}/qemu-system-alpha
372
373 %files system-arm
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_bindir}/qemu-system-arm
376
377 %files system-cris
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_bindir}/qemu-system-cris
380
381 %files system-lm32
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_bindir}/qemu-system-lm32
384
385 %files system-m68k
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/qemu-system-m68k
388
389 %files system-microblaze
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
392 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
393
394 %files system-mips
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_bindir}/qemu-system-mips
397 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
398 %attr(755,root,root) %{_bindir}/qemu-system-mips64
399 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
400
401 %files system-ppc
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_bindir}/qemu-system-ppc
404 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
405 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
406
407 %files system-s390x
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_bindir}/qemu-system-s390x
410
411 %files system-sh4
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_bindir}/qemu-system-sh4
414 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
415
416 %files system-sparc
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_bindir}/qemu-system-sparc
419 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
420
421 %files system-x86
422 %defattr(644,root,root,755)
423 %attr(755,root,root) %{_bindir}/qemu-system-i386
424 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
425
426 %files system-xtensa
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
429 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb
This page took 0.057047 seconds and 4 git commands to generate.