summaryrefslogtreecommitdiff
path: root/kvm.spec
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2006-11-05 15:26:16 +0000
committerAvi Kivity <avi@qumranet.com>2006-11-05 15:26:16 +0000
commiteda57046288048f967e9e2490e4b6b3d2da3492c (patch)
tree7afe785ac94d8aa29ba8c6bc856f0acf71513911 /kvm.spec
parent7888436c7020e2876dd5e1d9f9cb81cd2fad577d (diff)
kvm: rpm: make BuildRequire work even when required package is not installed
Diffstat (limited to 'kvm.spec')
-rw-r--r--kvm.spec11
1 files changed, 9 insertions, 2 deletions
diff --git a/kvm.spec b/kvm.spec
index f1fe1696..bd80c5a8 100644
--- a/kvm.spec
+++ b/kvm.spec
@@ -12,8 +12,15 @@ ExclusiveArch: i386 x86_64
Requires: qemu kvm-kmod bridge-utils
-%define compat_gcc %(rpm -qa | grep compat-gcc | sed 's/^[^0-9]*//' | sed 's/-.*//')
-BuildRequires: SDL-devel zlib-devel compat-gcc-%{compat_gcc}
+%define fedora_release %(rpm -q --qf '%%{version}' fedora-release)
+
+%if %{fedora_release} == 5
+BuildRequires: compat-gcc-32
+%else
+BuildRequires: compat-gcc-34
+%endif
+
+BuildRequires: SDL-devel zlib-devel
%description
The Kernel Virtual Machine provides a virtualization enviroment for processors