summaryrefslogtreecommitdiff
path: root/Makefile
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
commitc541d52105a659a683f482f88ec6cb80d3523228 (patch)
tree24be15ba4cab4380991313c3a45617211a6d82a6 /Makefile
parenteda57046288048f967e9e2490e4b6b3d2da3492c (diff)
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 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 635612fc..a5fe63c2 100644
--- a/Makefile
+++ b/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)