summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYedidyah Bar David <didi@redhat.com>2015-11-17 17:49:06 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-11-19 14:31:42 +0100
commit406b30177063afe327c2d86425b8286a1bd9bb98 (patch)
tree93a645c0567a76e003219db926f7833e0781d07d
parent1809abf023d7e3b6bb84b2c326fbd1c2e3d32bf6 (diff)
build: Add ISO generation as well as make install
The preferred method of distribution of the oVirt guest tools installer is to have it in an ISO image wrapped in an RPM. This allows to easily share installer updates with multiple Windows guests. This commits adds an 'iso' target to the Makefile which will generate such an ISO which can then be consumed by the guest-tools-iso spec file. Split off from [1]. [1] https://gerrit.ovirt.org/47771 Change-Id: I294f640d95bdcec6bc0267e79c4fed244ecbc36e Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Yedidyah Bar David <didi@redhat.com>
-rw-r--r--Makefile27
1 files changed, 26 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f1d6558..5be6894 100644
--- a/Makefile
+++ b/Makefile
@@ -12,16 +12,29 @@ ifeq ($(MODE),SPICE)
INSTALLER=spice-guest-tools-$(VERSION).exe
# 'make install' target (in /usr/share)
INSTALL_NAME=spice-guest-tools-iso
+# ISO image filename
+ISO_IMAGE=SPICE-tools_$(DISPLAYED_VERSION).iso
+# link also to this name which has no version
+ISO_GENERIC=SPICE-tools.iso
+# ISO image preparer and publisher
+ISO_P_TEXT=SPICE project
+# ISO image label/identifier. Limited to 16 chars (with joliet extensions)
+ISO_LABEL=SPICE-WGT-$(DISPLAYED_VERSION)
else
ifeq ($(MODE),OVIRT)
INSTALLER=ovirt-guest-tools-setup-$(VERSION).exe
INSTALL_NAME=ovirt-guest-tools-iso
+ISO_IMAGE=oVirt-toolsSetup_$(DISPLAYED_VERSION).iso
+ISO_GENERIC=ovirt-tools-setup.iso
+ISO_P_TEXT=oVirt - KVM Virtualization Manager Project (www.ovirt.org)
+ISO_LABEL=oVirt-WGT-$(DISPLAYED_VERSION)
else
$(error Please set MODE to one of SPICE or OVIRT, not [$(MODE)])
endif
endif
TEMP_DIR=temp_dir
+ISO_ROOT=$(TEMP_DIR)/iso
# common dependencies/sources
@@ -61,7 +74,7 @@ DATAROOT_DIR=$(PREFIX)/share
# install targets
INSTALL_DATA_DIR=$(DATAROOT_DIR)/$(INSTALL_NAME)
-all: copy-files installer
+all: copy-files iso
copy-files: common-files extra-files
@@ -119,5 +132,17 @@ extra-files:
endif
endif
+iso: $(ISO_IMAGE)
+
+$(ISO_IMAGE): installer
+ mkdir -p "$(ISO_ROOT)"
+ $(RSYNC_AH) "$(INSTALLER)" bin drivers "$(ISO_ROOT)"
+ mkisofs -J -r -lsv -V "$(ISO_LABEL)" -p "$(ISO_P_TEXT)" -publisher "$(ISO_P_TEXT)" -o "$(ISO_IMAGE)" "$(ISO_ROOT)"
+
+install: iso
+ mkdir -p "$(DESTDIR)$(INSTALL_DATA_DIR)"
+ $(RSYNC_AH) "$(ISO_IMAGE)" "$(DESTDIR)$(INSTALL_DATA_DIR)"
+ ln -s "$(ISO_IMAGE)" "$(DESTDIR)$(INSTALL_DATA_DIR)/$(ISO_GENERIC)"
+
clean:
rm -rf *.exe bin drivers "$(TEMP_DIR)" "$(ISO_IMAGE)"