diff --git a/configure.ac b/configure.ac index 067c918..c09f8b6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT([virt-viewer],[0.6.0]) +AC_INIT([virt-viewer],[1.0]) AC_CONFIG_SRCDIR(src/virt-viewer-main.c) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) @@ -212,23 +212,13 @@ fi AC_ARG_WITH([buildid], AS_HELP_STRING([--with-buildid=id], [Set additional build version details]), - [buildid="-$with_buildid"], [buildid=""]) + [buildid="$with_buildid"], [buildid="0"]) AC_DEFINE_UNQUOTED([BUILDID], "$buildid", [Build version details]) -if test "x$buildid" != x; then - AC_SUBST([BUILDID], "$buildid") -fi +AC_SUBST([BUILDID], "$buildid") major=`echo $PACKAGE_VERSION | cut -d. -f1` minor=`echo $PACKAGE_VERSION | cut -d. -f2` -micro=`echo $PACKAGE_VERSION | cut -d. -f3` -buildid=`echo $with_buildid | cut -d. -f1` -if test "x$buildid" = x; then - buildid=0 -fi -# In RHEV builds -# build = $micro << 12 + (%release[0] << 4 + %release[1]) -build=`expr $micro \* 4096 + $buildid` -WINDOWS_PRODUCTVERSION="$major.$minor.$build" +WINDOWS_PRODUCTVERSION="$major.$minor.$buildid" AC_SUBST([WINDOWS_PRODUCTVERSION]) diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in index fb1c9fd..bf83d08 100644 --- a/mingw-virt-viewer.spec.in +++ b/mingw-virt-viewer.spec.in @@ -1,8 +1,20 @@ %{?mingw_package_header} +%define relver 1%{?dist} + +# We want the 1st part of the release number, and +# the 3rd part (or 0 if not present). We want to +# avoid the autobuild magic %{extra_release} too +# which is not purely numeric and larger than 255. +# This scheme lets us cope with RHEL-style z-stream +# versioning when creating Win product versions +%define rel0 %(echo %{relver} | cut -d. -f1) +%define rel1 %(test -z "`echo %{relver} | cut -d. -f3`" && echo 0 || (echo %{relver} | cut -d. -f3)) +%define buildid %(expr %{rel0} \\* 256 + %{rel1}) + Name: mingw-virt-viewer Version: @VERSION@ -Release: 1%{?dist}%{?extra_release} +Release: %{relver}%{?extra_release} Summary: MinGW Windows virt-viewer console application License: GPLv2+ @@ -83,9 +95,8 @@ MinGW Windows virt-viewer MSI %prep %setup -q -n virt-viewer-%{version} - %build -%mingw_configure --with-gtk=2.0 --with-buildid=%{release} +%mingw_configure --with-gtk=2.0 --with-buildid=%{buildid} %mingw_make %{?_smp_mflags} V=1 %mingw_make %{?_smp_mflags} V=1 -C data msi