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