From e2b3df250184e6e563154e697ba6ea936fcdfe12 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 7 Jun 2016 18:04:53 +0000 Subject: [PATCH] Parametrize strace.spec * 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 | 11 ++++++++++- strace.spec => strace.spec.in | 8 ++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) rename strace.spec => strace.spec.in (98%) diff --git a/configure.ac b/configure.ac index 9528a7f2..be9135bd 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/strace.spec b/strace.spec.in similarity index 98% rename from strace.spec rename to strace.spec.in index cba30cce..842543e4 100644 --- a/strace.spec +++ b/strace.spec.in @@ -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 - 4.12-1 - 4.11.0.163.9720 -> 4.12. -- 2.40.0