]> granicus.if.org Git - strace/commitdiff
Parametrize strace.spec
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 7 Jun 2016 18:04:53 +0000 (18:04 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 7 Jun 2016 18:16:41 +0000 (18:16 +0000)
* configure.ac (SPEC_VERSION, CHANGELOGTIME): Define.
(AC_CONFIG_FILES): Add strace.spec.
* strace.spec: Rename to ...
* strace.spec.in: ... this file.  Parametrize Version, srcname,
and the last %changelog entry.  Initialize .tarball-version file.

configure.ac
strace.spec.in [moved from strace.spec with 98% similarity]

index 9528a7f26e92d1aff0bbc57cd8b9b25bfd0886cc..be9135bddc3c3470048f6258ec6edd0ffb82d91c 100644 (file)
@@ -40,6 +40,11 @@ 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)
+
 AC_PROG_CC
 AC_PROG_CPP
 AX_PROG_CC_FOR_BUILD
@@ -779,5 +784,9 @@ fi
 st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64])
 st_MPERS([mx32], [x86_64])
 
-AC_CONFIG_FILES([Makefile tests/Makefile tests-m32/Makefile tests-mx32/Makefile])
+AC_CONFIG_FILES([Makefile
+                tests/Makefile
+                tests-m32/Makefile
+                tests-mx32/Makefile
+                strace.spec])
 AC_OUTPUT
similarity index 98%
rename from strace.spec
rename to strace.spec.in
index cba30cce25685ce17ce686510855aa3cdcd9e8f6..842543e4f332e0e8cb7e810690251e57cb571bc4 100644 (file)
@@ -1,8 +1,8 @@
 Summary: Tracks and displays system calls associated with a running process
 Name: strace
-Version: 4.12
+Version: @SPEC_VERSION@
 Release: 1%{?dist}
-%define srcname %name-%version
+%define srcname @PACKAGE_TARNAME@-@PACKAGE_VERSION@
 License: BSD
 Group: Development/Debuggers
 URL: http://sourceforge.net/projects/strace/
@@ -51,6 +51,7 @@ The `strace' program in the `strace' package is for 32-bit processes.
 
 %prep
 %setup -q -n %{srcname}
+echo -n %version-%release > .tarball-version
 
 %build
 echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION'
@@ -103,6 +104,9 @@ echo 'END OF TEST SUITE INFORMATION'
 %endif
 
 %changelog
+* @CHANGELOGTIME@ @PACKAGE_BUGREPORT@ - @SPEC_VERSION@-%release
+- @PACKAGE_STRING@ snapshot.
+
 * Tue May 31 2016 Dmitry V. Levin <ldv@altlinux.org> - 4.12-1
 - 4.11.0.163.9720 -> 4.12.