]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
- higher INITRD_LOAD_ADDR, so a big kernel, like that in PLD, can successfully be...
[packages/qemu.git] / qemu.spec
1 #
2 # Conditional build:
3 %bcond_with     kqemu                   # with QEMU accelerator module
4 #
5 Summary:        QEMU CPU Emulator
6 Summary(pl):    QEMU - emulator procesora
7 Name:           qemu
8 Version:        0.7.0
9 Release:        1.2
10 License:        GPL
11 Group:          Applications/Emulators
12 #Source0Download: http://fabrice.bellard.free.fr/qemu/download.html
13 Source0:        http://fabrice.bellard.free.fr/qemu/%{name}-%{version}.tar.gz
14 # Source0-md5:  234e9ace03b00259bb57dc5a9c633056
15 %if %{with kqemu}
16 Source1:        http://fabrice.bellard.free.fr/qemu/kqemu-0.6.2-1.tar.gz
17 # NoSource1-md5:        c6bb3b40fb3d526d731eb0f1f9dee7ee
18 NoSource:       1
19 %endif
20 Patch0:         %{name}-nostatic.patch
21 Patch1:         %{name}-DESTDIR.patch
22 Patch2:         %{name}-longjmp.patch
23 Patch3:         %{name}-dot.patch
24 Patch4:         %{name}-initrd_load_addr.patch
25 URL:            http://fabrice.bellard.free.fr/qemu/
26 BuildRequires:  SDL-devel >= 1.2.1
27 BuildRequires:  sed >= 4.0
28 %if %{with kqemu}
29 BuildRequires: kernel-source
30 %endif
31 ExclusiveArch:  %{ix86} %{x8664} ppc
32 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 # some SPARC boot image in ELF format
36 %define         _noautostrip    .*%{_datadir}/qemu/proll.elf
37
38 %description
39 QEMU is a FAST! processor emulator. By using dynamic translation it
40 achieves a reasonnable speed while being easy to port on new host
41 CPUs. QEMU has two operating modes:
42
43 - User mode emulation. In this mode, QEMU can launch Linux processes
44   compiled for one CPU on another CPU. Linux system calls are converted
45   because of endianness and 32/64 bit mismatches. Wine (Windows
46   emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
47
48 - Full system emulation. In this mode, QEMU emulates a full system,
49   including a processor and various peripherials. 
50   It can also be used to provide virtual hosting of several 
51   virtual PC on a single server.
52
53 %description -l pl
54 QEMU to szybki(!) emulator procesora. Poprzez u¿ycie dynamicznego
55 t³umaczenia osi±ga rozs±dn± szybko¶æ i jest ³atwy do przeportowania,
56 aby dzia³a³ na kolejnych procesorach. QEMU ma dwa tryby pracy:
57
58 - Emulacja trybu u¿ytkownika. W tym trybie QEMU mo¿e uruchamiaæ
59   procesy linuksowe skompilowane dla jednego procesora na innym
60   procesorze. Linuksowe wywo³ania systemowe s± t³umaczone ze wzglêdu
61   na niezgodno¶æ kolejno¶ci bajtów w s³owie i 32/64-bitowego rozmiaru
62   s³owa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to g³ówne
63   cele QEMU.
64
65 - Pe³na emulacja systemu. W tym trybie QEMU emuluje ca³y system,
66   w³±czaj±c w to procesor i ró¿ne urz±dzenia peryferyjne.
67   Mo¿e byæ tak¿e u¿ywane do wirtualnego hostowania kilku wirtualnych 
68   pecetów na pojedynczym serwerze.
69
70 %prep
71 %setup -q %{?with_kqemu:-a1}
72 %patch0 -p1
73 %patch1 -p1
74 %patch2 -p1
75 %patch3 -p1
76 %patch4 -p1
77
78 sed -i -e 's/sdl_static=yes/sdl_static=no/' configure
79 # cannot use optflags on x86 - they cause "no register to spill" errors
80 #sed -i -e 's/-Wall -O2 -g/-Wall %{rpmcflags}/' Makefile Makefile.target
81
82 %{?with_kqemu:echo -n > kqemu/install.sh}
83
84 %build
85
86 %if %{with kqemu}
87 cp -rdp %{_kernelsrcdir}/ .
88 rm -f linux/.config
89 cp -f linux/config-smp linux/.config
90 make -C linux modules_prepare
91 %endif
92
93 # --extra-cflags don't work (overridden by CFLAGS in Makefile*)
94 ./configure \
95         --prefix=%{_prefix} \
96         --cc="%{__cc}" \
97   %if %{with kqemu}
98         --enable-kqemu }\
99         --kernel-path=`pwd`/linux \
100   %endif
101         --make="%{__make}"
102
103 %{__make} 
104
105 %if %{with kqemu}
106 mv kqemu/kqemu.ko kqemu/kqemu.smp
107 cp -f linux/config-up linux/.config
108 make -C linux modules_prepare
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %{__make} install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 %if %{with kqemu}
118 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
119 install kqemu/kqemu.smp $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/kqemu.ko
120 install kqemu/kqemu.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
121 %endif
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %post
127 %if %{with kqemu}
128 %depmod
129
130 %banner %{name} -e << EOF
131 To enable qemu accelerator (kqemu), You must manually create device for it:
132 mknod /dev/kqemu c 250 0
133 chmod 666 /dev/kqemu
134
135 And before start qemu, the kqemu kernel module must be loaded:
136 modprobe kqemu
137 EOF
138 %endif
139
140 %postun
141 %{?with_kqemu: %depmod}
142
143 %files
144 %defattr(644,root,root,755)
145 %doc README qemu-doc.html qemu-tech.html
146 %attr(755,root,root) %{_bindir}/*
147 %{_datadir}/qemu
148 %{_mandir}/man1/qemu.1*
149 %{_mandir}/man1/qemu-img.1*
150 %{?with_kqemu: /lib/*}
This page took 0.082753 seconds and 4 git commands to generate.