summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-07-26 14:00:42 +0100
committerFrediano Ziglio <fziglio@redhat.com>2017-08-07 12:20:59 +0100
commit0e2bc4ca26cadaa04954e13735364cf4aa4739fe (patch)
tree3ce54054e2f9c82f1b6ad5da0689975d01e83134
parent42ac031b24a22e6cd8805c7fbe73bd7cd290f074 (diff)
Do not use dash in rpm version
RPM does not allow dash in version string. Replace dashes with underscores. This make easier to run "make dist" followed by rpmbuild. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pavelgrunt@gmail.com>
-rw-r--r--configure.ac2
-rw-r--r--mingw-spice-vdagent.spec.in6
2 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index bb33075..fbcb8da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,8 @@ AC_DEFINE_UNQUOTED([RC_PRODUCTVERSION_STR], "$RC_PRODUCTVERSION", [Resource prod
AC_DEFINE_UNQUOTED([RC_PRODUCTVERSION], [$RC_PRODUCTVERSION], [Resource product version])
BUILD_YEAR=`date +%Y`
AC_DEFINE_UNQUOTED([BUILD_YEAR], "$BUILD_YEAR", [Build year])
+RPM_VERSION=`echo $PACKAGE_VERSION | sed 's,-,_,g'`
+AC_SUBST([RPM_VERSION])
# Check for programs
AC_PROG_CC
diff --git a/mingw-spice-vdagent.spec.in b/mingw-spice-vdagent.spec.in
index d25ea31..d129a7b 100644
--- a/mingw-spice-vdagent.spec.in
+++ b/mingw-spice-vdagent.spec.in
@@ -16,13 +16,13 @@
%endif
Name: mingw-spice-vdagent
-Version: @VERSION@
+Version: @RPM_VERSION@
Release: 1%{?dist}%{?extra_release}
Summary: MinGW Windows SPICE guest agent
License: GPLv2+
URL: https://www.spice-space.org/
-Source0: vdagent-win-%{version}%{?_version_suffix}.tar.xz
+Source0: vdagent-win-@VERSION@%{?_version_suffix}.tar.xz
BuildRequires: mingw32-filesystem >= 23
BuildRequires: mingw64-filesystem >= 23
@@ -84,7 +84,7 @@ Features:
session and the client
%prep
-%setup -q -n vdagent-win-%{version}%{?_version_suffix}
+%setup -q -n vdagent-win-@VERSION@%{?_version_suffix}
%{mingw_debug_package}