aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2006-11-05 17:25:29 +0000
committerAvi Kivity <avi@qumranet.com>2006-11-05 17:25:29 +0000
commitf7d3c5ecb3a548c345323eb2cb5a6495ca4d5ca5 (patch)
treeae3dac911260b7c3e5e9c77e0c5d0aab63bf2784 /kvm/Makefile
parentkvm: rpm: make BuildRequire work even when required package is not installed (diff)
downloadqemu-kvm-f7d3c5ecb3a548c345323eb2cb5a6495ca4d5ca5.tar.gz
qemu-kvm-f7d3c5ecb3a548c345323eb2cb5a6495ca4d5ca5.tar.bz2
qemu-kvm-f7d3c5ecb3a548c345323eb2cb5a6495ca4d5ca5.zip
kvm: rpm: allow building userspace source rpm
'make rpm' continues to build an rpm from prebuilt binaries 'make srpm' builds a source rpm that can be compiled with rpmbuild the %{prebuilt} macro serves to distinguish between prebuilt and ordinary builds.
Diffstat (limited to 'kvm/Makefile')
-rw-r--r--kvm/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/kvm/Makefile b/kvm/Makefile
index 635612fcc..a5fe63c24 100644
--- a/kvm/Makefile
+++ b/kvm/Makefile
@@ -41,4 +41,15 @@ rpm: user qemu
rpmbuild --define="kverrel $$(uname -r)" \
--define="objdir $$(pwd)" \
--define="_topdir $$(pwd)" \
+ --define="prebuilt 1" \
-bb $(tmpspec)
+
+srpm:
+ mkdir -p SOURCES SRPMS
+ sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec > $(tmpspec)
+ tar czf SOURCES/kvm.tar.gz qemu
+ tar czf SOURCES/user.tar.gz user
+ tar czf SOURCES/kernel.tar.gz kernel
+ tar czf SOURCES/scripts.tar.gz scripts
+ cp Makefile SOURCES
+ rpmbuild --define="_topdir $$(pwd)" -bs $(tmpspec)