]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
7c3e124e95ea645fe69cdd6584ec6d154b93e562
[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 Patch0:         %{name}-cflags.patch
25 Patch6:         %{name}-nosdlgui.patch
26 # Proof of concept, for reference, do not remove
27 Patch8:         %{name}-kde_virtual_workspaces_hack.patch
28 Patch17:        %{name}-whitelist.patch
29 URL:            http://wiki.qemu.org/Index.html
30 BuildRequires:  SDL-devel >= 1.2.1
31 BuildRequires:  alsa-lib-devel
32 BuildRequires:  bluez-libs-devel
33 BuildRequires:  gnutls-devel
34 BuildRequires:  ncurses-devel
35 BuildRequires:  perl-Encode
36 BuildRequires:  perl-tools-pod
37 BuildRequires:  pkgconfig
38 BuildRequires:  sed >= 4.0
39 BuildRequires:  texi2html
40 BuildRequires:  texinfo
41 BuildRequires:  which
42 BuildRequires:  xen-devel
43 BuildRequires:  xorg-lib-libX11-devel
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}
59 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
60 ExclusiveArch:  %{ix86} %{x8664} %{?with_userspace:ppc}
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 # some PPC/SPARC boot image in ELF format
64 %define         _noautostrip    .*%{_datadir}/qemu/.*-.*
65
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,
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.
79
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:
84
85 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
86   procesy linuksowe skompilowane dla jednego procesora na innym
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
90   cele QEMU.
91
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
95   pojedynczym serwerze.
96
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}
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
273 %prep
274 %setup -q
275 %patch0 -p1
276 %{?with_nosdlgui:%patch6 -p1}
277 #patch8 -p1
278 %patch17 -p0
279
280 # workaround for conflict with alsa/error.h
281 ln -s ../error.h qapi/error.h
282
283 %build
284 ./configure \
285         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
286         --extra-ldflags="%{rpmldflags}" \
287         --disable-strip \
288         --sysconfdir=%{_sysconfdir} \
289         --prefix=%{_prefix} \
290         --cc="%{__cc}" \
291         --host-cc="%{__cc}" \
292         --enable-mixemu \
293         --audio-drv-list="alsa" \
294         --interp-prefix=%{_libdir}/%{name}
295 %{__make} V=1
296
297 %install
298 rm -rf $RPM_BUILD_ROOT
299
300 %{__make} install \
301         DESTDIR=$RPM_BUILD_ROOT
302
303 install -d $RPM_BUILD_ROOT%{_sysconfdir}
304 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
305 #!/bin/sh
306
307 EOF
308
309 # already packaged
310 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
311
312 %clean
313 rm -rf $RPM_BUILD_ROOT
314
315 %files
316 %defattr(644,root,root,755)
317
318 %files common
319 %defattr(644,root,root,755)
320 %doc README qemu-doc.html qemu-tech.html
321 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
322 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
323 %dir %{_sysconfdir}/qemu
324 %attr(755,root,root) %{_bindir}/qemu-nbd
325 %{_mandir}/man1/qemu.1*
326 %{_mandir}/man8/qemu-nbd.8*
327
328 %dir %{_datadir}/qemu
329 %{_datadir}/%{name}/cpus-*.conf
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
This page took 0.056127 seconds and 3 git commands to generate.