4 Summary: Kernel Virtual Machine virtualization environment
6 Group: System Environment
/Kernel
8 URL: http
://www.qumranet.com
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
11 ExclusiveArch: i386 x86_64
13 Requires: kvm
-kmod bridge
-utils
15 %define Distribution %
(cat
/etc
/redhat
-release | awk '
{ print $
1}' | tr
[A
-Z
] [a
-z
])
16 %define os_release %
(rpm
-q
--qf '%
%{version}' %{Distribution}-release
)
18 %if %{Distribution} == "fedora" && %{os_release} == 5 || %{Distribution} == "centos" && %{os_release} == 4
19 BuildRequires
: compat
-gcc
-32
21 BuildRequires
: compat
-gcc
-34
24 BuildRequires
: SDL
-devel zlib
-devel alsa
-lib
-devel
26 %define _prebuilt
%{?prebuilt:1}%{!?prebuilt:0}
31 Source2: kernel.tar.gz
32 Source3: scripts.tar.gz
39 The Kernel Virtual Machine provides a virtualization enviroment
for processors
40 with hardware support
for virtualization
: Intel's VT and AMD's AMD
-V.
45 %setup -T
-b
0 -n qemu
46 %setup -T
-b
1 -n user
-D
47 %setup -T
-b
2 -n kernel
-D
48 %setup -T
-b
3 -n scripts
-D
50 cp
%{_sourcedir}/Makefile %{_sourcedir}/configure %{_sourcedir}/kvm_stat .
59 .
/configure
--prefix
=/usr
/kvm
63 # kpath="$(readlink -f ../kernel/include)"
64 # upath="$(readlink -f ../user)"
65 # ./configure --target-list=$(uname -i)-softmmu \
66 # --extra-cflags="-I$kpath -I$upath" \
67 # --extra-ldflags="-L$upath" \
68 # --disable-kqemu --enable-kvm --prefix=/usr/kvm
81 make DESTDIR
=%{buildroot} install-rpm
83 %define bindir
/usr
/bin
84 %define bin
%{bindir}/kvm
85 %define initdir
/etc
/init.d
86 %define confdir
/etc
/kvm
87 %define utilsdir
/etc
/kvm
/utils
90 /sbin
/chkconfig
--level
2345 kvm on
91 /sbin
/chkconfig
--level
16 kvm off
92 /usr
/sbin
/groupadd
-fg 444 kvm
97 %{__rm} -rf %{buildroot}
104 /etc
/udev
/rules.d
/*kvm
*.rules