Blame SOURCES/0006-build-sys-Always-prepend-to-build-id.patch

4ab194
From d7574d436d973a44d02e26cc7fa77de21030ad62 Mon Sep 17 00:00:00 2001
4ab194
From: Christophe Fergeau <cfergeau@redhat.com>
4ab194
Date: Wed, 2 Apr 2014 13:43:17 +0200
4ab194
Subject: [PATCH] build-sys: Always prepend '-' to build id
4ab194
4ab194
When using the --with-buildid configure paramater, the build id which is
4ab194
substituted in the MSI wxs file is automatically prepended by a '-', but
4ab194
the build id which is used in the C files does not get this '-'
4ab194
automatically.
4ab194
4ab194
Currently, the linux and mingw spec files prepend a '-' on their own to the
4ab194
--with-buildid argument, but this causes the MSI installer to show 2 '-'
4ab194
during installation: "Please wait while Windows configures VirtViewer
4ab194
0.6.0--1"
4ab194
4ab194
This commit always prepends a '-' to the buildid strings, and removes the
4ab194
'-' from the spec files. This is to ensure the separator between version
4ab194
number and buildid is not forgotten, which could give a confusing version
4ab194
number.
4ab194
---
4ab194
 configure.ac              | 9 +++++----
4ab194
 mingw-virt-viewer.spec.in | 2 +-
4ab194
 virt-viewer.spec.in       | 2 +-
4ab194
 3 files changed, 7 insertions(+), 6 deletions(-)
4ab194
4ab194
diff --git a/configure.ac b/configure.ac
4ab194
index 7a00bf4..f966688 100644
4ab194
--- a/configure.ac
4ab194
+++ b/configure.ac
4ab194
@@ -211,10 +211,11 @@ if test "x$have_gtk_vnc" != "xyes" && test "x$have_spice_gtk" != "xyes"; then
4ab194
 fi
4ab194
 
4ab194
 AC_ARG_WITH([buildid],
4ab194
-    AS_HELP_STRING([--with-buildid=id], [Set additional build version details]))
4ab194
-AC_DEFINE_UNQUOTED([BUILDID], "$with_buildid", [Build version details])
4ab194
-if test "x$with_buildid" != x; then
4ab194
-    AC_SUBST([BUILDID], "-$with_buildid")
4ab194
+    AS_HELP_STRING([--with-buildid=id], [Set additional build version details]),
4ab194
+    [buildid="-$with_buildid"], [buildid=""])
4ab194
+AC_DEFINE_UNQUOTED([BUILDID], "$buildid", [Build version details])
4ab194
+if test "x$buildid" != x; then
4ab194
+    AC_SUBST([BUILDID], "$buildid")
4ab194
 fi
4ab194
 
4ab194
 major=`echo $PACKAGE_VERSION | cut -d. -f1`
4ab194
diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in
4ab194
index 44d9230..fb1c9fd 100644
4ab194
--- a/mingw-virt-viewer.spec.in
4ab194
+++ b/mingw-virt-viewer.spec.in
4ab194
@@ -85,7 +85,7 @@ MinGW Windows virt-viewer MSI
4ab194
 
4ab194
 
4ab194
 %build
4ab194
-%mingw_configure --with-gtk=2.0 --with-buildid=-%{release}
4ab194
+%mingw_configure --with-gtk=2.0 --with-buildid=%{release}
4ab194
 
4ab194
 %mingw_make %{?_smp_mflags} V=1
4ab194
 %mingw_make %{?_smp_mflags} V=1 -C data msi
4ab194
diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
4ab194
index 3dfeb96..3cbf194 100644
4ab194
--- a/virt-viewer.spec.in
4ab194
+++ b/virt-viewer.spec.in
4ab194
@@ -109,7 +109,7 @@ autoreconf -if
4ab194
 %define govirt_arg --with-ovirt
4ab194
 %endif
4ab194
 
4ab194
-%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=-%{release} --disable-update-mimedb
4ab194
+%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
4ab194
 %__make %{?_smp_mflags}
4ab194
 
4ab194