[Spice-devel] [NSIS 5/6] packaging: add ovirt-guest-tools-iso.spec.in

Yedidyah Bar David didi at redhat.com
Wed Nov 11 23:06:29 PST 2015


Copied and adapted from ovirt-wgt-toolchain. See [1] [2].

In order to not duplicate the source code's version in the spec file,
generate it by make.

[1] https://gerrit.ovirt.org/47432
[2] https://gerrit.ovirt.org/48425

Change-Id: Ie6dcb72da2fe13bb154784a27f1ee992e9d12b14
Signed-off-by: Yedidyah Bar David <didi at redhat.com>
---
 Makefile                      | 18 ++++++++--
 ovirt-guest-tools-iso.spec.in | 81 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 ovirt-guest-tools-iso.spec.in

diff --git a/Makefile b/Makefile
index 0f30c4d..d2bc262 100644
--- a/Makefile
+++ b/Makefile
@@ -150,8 +150,20 @@ install: iso
 	ln -s "$(ISO_IMAGE)" "$(DESTDIR)$(INSTALL_DATA_DIR)/$(ISO_GENERIC)"
 
 clean:
-	rm -rf *.exe bin drivers "$(TEMP_DIR)" "$(ISO_IMAGE)"
+	rm -rf *.exe bin drivers "$(TEMP_DIR)" "$(ISO_IMAGE)" $(GENERATED)
 
-dist:
-	git archive --prefix "$(NAME)"/ --format=tar.gz HEAD -o "$(ARCHIVE)"
+.SUFFIXES:
+.SUFFIXES: .in
+
+.in:
+	sed \
+	-e "s|@VERSION@|$(VERSION)|g" \
+	$< > $@
+
+GENERATED = \
+	ovirt-guest-tools-iso.spec \
+	$(NULL)
+
+dist: ovirt-guest-tools-iso.spec
+	git ls-files | tar --files-from /proc/self/fd/0 -czf "$(ARCHIVE)" --owner=root --group=root --transform 's,^,$(NAME)/,' ovirt-guest-tools-iso.spec
 
diff --git a/ovirt-guest-tools-iso.spec.in b/ovirt-guest-tools-iso.spec.in
new file mode 100644
index 0000000..78d0b17
--- /dev/null
+++ b/ovirt-guest-tools-iso.spec.in
@@ -0,0 +1,81 @@
+# Up to two digits, to fit in the iso label
+%global rel 3
+
+%global spice_nsis_version @VERSION@
+
+Name:		ovirt-guest-tools-iso
+Version:	3.6
+Release:	%{rel}_master%{?release_suffix}%{?dist}
+Summary:	oVirt Windows Guest Tools
+License:	GPLv2 and GPLv2+ and ASL 2.0 and Zlib and MIT and Python and Platform SDK Redistributable EULA and Microsoft DDK Redistributable EULA
+Source:		http://resources.ovirt.org/pub/ovirt-master-snapshot/src/ovirt-wgt/spice-nsis-%{spice_nsis_version}.tar.gz
+URL:		http://www.ovirt.org/Features/oVirt_Windows_Guest_Tools
+BuildArch:	noarch
+Packager:	Lev Veyde <lveyde at redhat.com>
+
+BuildRequires:	genisoimage
+BuildRequires:	rsync
+BuildRequires:	mingw32-nsis >= 2.46
+
+# Drop these when virtio-win includes the drivers not inside an iso.
+# See comment in Makefile.
+BuildRequires:	p7zip
+BuildRequires:	p7zip-plugins
+BuildRequires:	hardlink
+
+# From http://www.spice-space.org/download/windows/vdagent/vdagent-win-0.7.3/
+BuildRequires:	mingw32-spice-vdagent >= 0.7.3
+BuildRequires:	mingw64-spice-vdagent >= 0.7.3
+
+# From http://resources.ovirt.org/pub
+BuildRequires:	ovirt-guest-agent-windows
+BuildRequires:	vcredist-x86
+BuildRequires:	nsis-simple-service-plugin
+
+# From https://fedoraproject.org/wiki/Windows_Virtio_Drivers#Yum.7CDnf_Repo
+BuildRequires:	virtio-win
+
+Obsoletes:	ovirt-guest-tools
+
+%description
+Windows Guest tools ISO for oVirt Virtualization Manager.
+
+%global make_common_opts \\\
+	PREFIX=%{_prefix} \\\
+	MODE=OVIRT \\\
+	DISPLAYED_VERSION='%{version}-%{release}'
+
+%prep
+%setup -n spice-nsis -q
+
+%build
+make %{make_common_opts}
+
+%install
+make %{make_common_opts} install DESTDIR="%{buildroot}"
+
+%files
+%{_datadir}/%{name}
+
+%changelog
+* Wed Nov 11 2015 Yedidyah Bar David <didi at redhat.com> 3.6-3
+- merged into upstream git repo spice-nsis
+- separated Makefile out of the spec file
+
+* Tue Oct 20 2015 Yedidyah Bar David <didi at redhat.com> 3.6-2
+- Updated oVirt Guest Agent (1.0.11)
+- dropped "artifacts" from all paths
+
+* Mon Nov 24 2014 Lev Veyde <lveyde at redhat.com> 3.5-7
+- Updated oVirt Guest Agent (1.0.10.3)
+
+* Wed Oct 22 2014 Lev Veyde <lveyde at redhat.com> 3.5-6
+- Volume label was changed to include oVirt prefix
+- ISO metada was added
+
+* Wed Oct 08 2014 Lev Veyde <lveyde at redhat.com> 3.5-5
+- Initial RPM based version of oVirt Guest Tools
+- Includes latest oVirt Guest Agent 1.0.10.2
+- Includes Spice Agent 0.7.2
+- Includes Spice QXL 0.1-21
+- Includes VirtIO-Win 0.1-81
-- 
2.1.4



More information about the Spice-devel mailing list