From: Dmitry V. Levin Date: Wed, 8 Jun 2016 00:23:28 +0000 (+0000) Subject: git-version-gen: replace '-' with '.' in generated version X-Git-Tag: v4.13~163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83ed8fb33c696f23e5098a798c23edb4cea64f40;p=strace git-version-gen: replace '-' with '.' in generated version * git-version-gen: Replace '-' with '.' so version conforms to policies * configure.ac (SPEC_VERSION): Remove. * strace.spec.in: Replace SPEC_VERSION with PACKAGE_VERSION. Remove %srcname. --- diff --git a/configure.ac b/configure.ac index be9135bd..1b843139 100644 --- a/configure.ac +++ b/configure.ac @@ -40,8 +40,6 @@ AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules parallel-te AM_MAINTAINER_MODE AC_CANONICAL_HOST -SPEC_VERSION="$(echo "$PACKAGE_VERSION" | sed s/-/./g)" -AC_SUBST(SPEC_VERSION) CHANGELOGTIME="$(LC_TIME=C date '+%a %b %d %Y')" AC_SUBST(CHANGELOGTIME) diff --git a/git-version-gen b/git-version-gen index 3de53651..28e9109f 100755 --- a/git-version-gen +++ b/git-version-gen @@ -186,7 +186,8 @@ then # Change the first '-' to a '.', so version-comparing tools work properly. # Remove the "g" in git describe's output string, to save a byte. - v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/'`; + # Change remaining '-' to '.', so version conforms to policies. + v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/;s/-/./g'`; v_from_git=1 elif test "x$fallback" = x || git --version >/dev/null 2>&1; then v=UNKNOWN diff --git a/strace.spec.in b/strace.spec.in index 842543e4..18765ca2 100644 --- a/strace.spec.in +++ b/strace.spec.in @@ -1,12 +1,11 @@ Summary: Tracks and displays system calls associated with a running process Name: strace -Version: @SPEC_VERSION@ +Version: @PACKAGE_VERSION@ Release: 1%{?dist} -%define srcname @PACKAGE_TARNAME@-@PACKAGE_VERSION@ License: BSD Group: Development/Debuggers URL: http://sourceforge.net/projects/strace/ -Source: http://downloads.sourceforge.net/strace/%{srcname}.tar.xz +Source: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz %if 0%{?fedora_version} >= 20 %define buildrequires_libunwind_devel BuildRequires: libunwind-devel %endif @@ -50,7 +49,7 @@ The `strace' program in the `strace' package is for 32-bit processes. %endif %prep -%setup -q -n %{srcname} +%setup -q echo -n %version-%release > .tarball-version %build @@ -104,7 +103,7 @@ echo 'END OF TEST SUITE INFORMATION' %endif %changelog -* @CHANGELOGTIME@ @PACKAGE_BUGREPORT@ - @SPEC_VERSION@-%release +* @CHANGELOGTIME@ @PACKAGE_BUGREPORT@ - @PACKAGE_VERSION@-%release - @PACKAGE_STRING@ snapshot. * Tue May 31 2016 Dmitry V. Levin - 4.12-1