]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - update patches | |
3 | # - qemu-system-ppc -hda ac-ppc.img says: | |
4 | # qemu: could not open disk image ac-ppc.img: Success | |
5 | # qemu-0.12.2-2.x86_64.rpm - broken | |
6 | # qemu-0.11.1-7k.x86_64.rpm - OK | |
7 | # | |
8 | # Conditional build: | |
9 | %bcond_with cflags_passing # with passing rpmcflags to Makefiles | |
10 | %bcond_with dosguest # add special patch when use with DOS as guest os | |
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: 0.12.3 | |
17 | Release: 1 | |
18 | License: GPL | |
19 | Group: Applications/Emulators | |
20 | # Source0Download: http://fabrice.bellard.free.fr/qemu/download.html | |
21 | Source0: http://download.savannah.gnu.org/releases/qemu/%{name}-%{version}.tar.gz | |
22 | # Source0-md5: d215e4568650e8019816397174c090e1 | |
23 | Patch0: %{name}-ncurses.patch | |
24 | Patch6: %{name}-nosdlgui.patch | |
25 | # Proof of concept, for reference, do not remove | |
26 | Patch8: %{name}-kde_virtual_workspaces_hack.patch | |
27 | #Patch12: %{name}-0.7.2-dyngen-check-stack-clobbers.patch | |
28 | Patch13: %{name}-dosguest.patch | |
29 | Patch14: %{name}-ppc_old_binutils.patch | |
30 | Patch15: %{name}-isa-bios-ram.patch | |
31 | # below one fixes problems with passing ram size to bios/bootloader | |
32 | # which affects coreboot/linuxbios | |
33 | Patch16: %{name}-piix-ram-size.patch | |
34 | Patch17: %{name}-whitelist.patch | |
35 | URL: http://www.nongnu.org/qemu/ | |
36 | BuildRequires: SDL-devel >= 1.2.1 | |
37 | BuildRequires: alsa-lib-devel | |
38 | BuildRequires: bluez-libs-devel | |
39 | BuildRequires: gnutls-devel | |
40 | BuildRequires: ncurses-devel | |
41 | BuildRequires: perl-Encode | |
42 | BuildRequires: perl-tools-pod | |
43 | BuildRequires: pkgconfig | |
44 | BuildRequires: sed >= 4.0 | |
45 | BuildRequires: texi2html | |
46 | BuildRequires: which | |
47 | BuildRequires: xorg-lib-libX11-devel | |
48 | Requires: SDL >= 1.2.1 | |
49 | # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c) | |
50 | ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc} | |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
52 | ||
53 | # some PPC/SPARC boot image in ELF format | |
54 | %define _noautostrip .*%{_datadir}/qemu/openbios-.* | |
55 | ||
56 | %description | |
57 | QEMU is a FAST! processor emulator. By using dynamic translation it | |
58 | achieves a reasonnable speed while being easy to port on new host | |
59 | CPUs. QEMU has two operating modes: | |
60 | ||
61 | - User mode emulation. In this mode, QEMU can launch Linux processes | |
62 | compiled for one CPU on another CPU. Linux system calls are converted | |
63 | because of endianness and 32/64 bit mismatches. Wine (Windows | |
64 | emulation) and DOSEMU (DOS emulation) are the main targets for QEMU. | |
65 | ||
66 | - Full system emulation. In this mode, QEMU emulates a full system, | |
67 | including a processor and various peripherials. It can also be used to | |
68 | provide virtual hosting of several virtual PC on a single server. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego | |
72 | tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania, | |
73 | aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy: | |
74 | ||
75 | - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać | |
76 | procesy linuksowe skompilowane dla jednego procesora na innym | |
77 | procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na | |
78 | niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru | |
79 | słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne | |
80 | cele QEMU. | |
81 | ||
82 | - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system, | |
83 | włączając w to procesor i różne urządzenia peryferyjne. Może być także | |
84 | używane do wirtualnego hostowania kilku wirtualnych pecetów na | |
85 | pojedynczym serwerze. | |
86 | ||
87 | %prep | |
88 | %setup -q | |
89 | %patch0 -p1 | |
90 | %{?with_nosdlgui:%patch6 -p1} | |
91 | #patch8 -p1 | |
92 | %patch17 -p0 | |
93 | ||
94 | %{__sed} -i -e 's/sdl_static=yes/sdl_static=no/' configure | |
95 | %{__sed} -i 's/.*MAKE) -C kqemu$//' Makefile | |
96 | ||
97 | # cannot use optflags on x86 - they cause "no register to spill" errors | |
98 | %if %{with cflags_passing} | |
99 | %{__sed} -i -e 's/-Wall -O2 -g/-Wall %{rpmcflags}/' Makefile Makefile.target | |
100 | %else | |
101 | %{__sed} -i 's/-Wall -O2 -g/-Wall -O2/' Makefile Makefile.target | |
102 | %endif | |
103 | ||
104 | %build | |
105 | # --extra-cflags don't work (overridden by CFLAGS in Makefile*) | |
106 | # they can be passed if the cflags_passing bcond is used | |
107 | ./configure \ | |
108 | --prefix=%{_prefix} \ | |
109 | --cc="%{__cc}" \ | |
110 | --host-cc="%{__cc}" \ | |
111 | --make="%{__make}" \ | |
112 | --enable-mixemu \ | |
113 | --audio-drv-list="alsa" \ | |
114 | --interp-prefix=%{_libdir}/%{name} | |
115 | %{__make} | |
116 | ||
117 | %install | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %{__make} install \ | |
121 | DESTDIR=$RPM_BUILD_ROOT | |
122 | ||
123 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
124 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup | |
125 | #!/bin/sh | |
126 | ||
127 | EOF | |
128 | ||
129 | # already packaged | |
130 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html | |
131 | ||
132 | %clean | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %files | |
136 | %defattr(644,root,root,755) | |
137 | %doc README qemu-doc.html qemu-tech.html | |
138 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup | |
139 | %attr(755,root,root) %{_bindir}/* | |
140 | %{_datadir}/qemu | |
141 | %{_mandir}/man1/qemu.1* | |
142 | %{_mandir}/man1/qemu-img.1* | |
143 | %{_mandir}/man8/qemu-nbd.8* |