[NSIS 06/13] build: Add ISO generation as well as make install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Yedidyah Bar David <didi@xxxxxxxxxx>
---
 Makefile | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

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)"
-- 
2.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]