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