]> granicus.if.org Git - strace/commitdiff
git-version-gen: replace '-' with '.' in generated version
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 8 Jun 2016 00:23:28 +0000 (00:23 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 8 Jun 2016 00:27:22 +0000 (00:27 +0000)
* 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.

configure.ac
git-version-gen
strace.spec.in

index be9135bddc3c3470048f6258ec6edd0ffb82d91c..1b8431394b29e00f2a9fc78252497345b6168ccd 100644 (file)
@@ -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)
 
index 3de536516760330c8eb7f92569e7bc2a53b5b717..28e9109f69b5b621eb5aeab2a877f9dcf4287fb7 100755 (executable)
@@ -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
index 842543e4f332e0e8cb7e810690251e57cb571bc4..18765ca297622ee77a8494fe9f2712f4a494adf4 100644 (file)
@@ -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 <ldv@altlinux.org> - 4.12-1