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