[Crosstoolchain-logs] [gdb] 03/04: d/rules: do not misuse the version field to encode the distro name

Hector Oron zumbi at moszumanska.debian.org
Thu May 8 12:51:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch master
in repository gdb.

commit 6bced850a430c8a01fad535f031bf5e01947ec6a
Author: Héctor Orón Martínez <zumbi at debian.org>
Date:   Thu May 8 14:35:38 2014 +0200

    d/rules: do not misuse the version field to encode the distro name
    
    Signed-off-by: Héctor Orón Martínez <zumbi at debian.org>
---
 debian/rules | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/debian/rules b/debian/rules
index 8a7010f..edcbe33 100755
--- a/debian/rules
+++ b/debian/rules
@@ -89,6 +89,9 @@ ifneq (,$(filter $(DEB_HOST_ARCH),i386 powerpc sparc s390))
 endif
 endif
 
+distribution := $(shell lsb_release -is)
+deb_version := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
+
 BUILDDIRMULTIARCH = $(ALL_BUILDDIR)/objdir-multiarch
 
 run_tests := yes
@@ -122,6 +125,7 @@ export INSTALL
 # We pass srcdir explicitly to avoid an extra '/.' at the end of it.  That
 # causes a harmless, but ugly, testsuite failure in maint.exp.
 EXTRA_FLAGS := --disable-gdbtk --disable-shared \
+	--with-pkgversion='$(distribution) $(deb_version)' \
 	--srcdir=$(shell pwd) \
 	--disable-readline --with-system-readline --with-expat \
 	$(arch_config_args) --build=$(DEB_BUILD_GNU_TYPE)
@@ -186,17 +190,10 @@ ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
 endif
 
 DEB_MAKE_BUILD_TARGET = $(NJOBS) all
-distribution := $(shell lsb_release -is)
 
 BUILDDIRSOURCE := $(ALL_BUILDDIR)/gdb
 BUILDDIRMIN := $(ALL_BUILDDIR)/gdb-minimal
 
-post-patches::
-	if ! test -f gdb/version.in.backup; then \
-	  mv -f gdb/version.in gdb/version.in.backup; \
-	  sed -e 's/$$/ ($(distribution) $(DEB_VERSION))/' < gdb/version.in.backup > gdb/version.in; \
-	fi
-
 # This should probably be common-post-build-arch, but that runs during
 # install, under fakeroot, in CDBS 0.4.21.
 build/gdb$(TS):: check-stamp

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gdb/gdb.git



More information about the Crosstoolchain-logs mailing list