[flint] 04/04: Avoid parsing the changelog to find the upstream version

Julien Puydt julien.puydt at laposte.net
Mon Oct 23 08:14:40 UTC 2017


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

jpuydt-guest pushed a commit to branch master
in repository flint.

commit a2bb3b1a1a544f22ef4269df486bcedc1bc26c91
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Mon Oct 23 10:12:29 2017 +0200

    Avoid parsing the changelog to find the upstream version
---
 debian/changelog | 1 +
 debian/rules     | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 62a58e9..78895ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ flint (2.5.2-16) UNRELEASED; urgency=medium
   * Bump standards-version to 4.1.1.
   * Bump d/watch to version 4.
   * Add override for missing autopkgtest.
+  * Avoid parsing the changelog for the upstream version.
 
  -- Julien Puydt <julien.puydt at laposte.net>  Mon, 07 Aug 2017 10:57:23 +0200
 
diff --git a/debian/rules b/debian/rules
index 39a1e44..f0a0546 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,8 @@
 #!/usr/bin/make -f
 
-VERSION := $(shell dpkg-parsechangelog | grep -x "Version:.*" | sed 's at Version: \(.\+\)-.\+@\1@')
-EXTRA_SHARED_FLAGS=-Wl,-soname,libflint-$(VERSION).so
+include /usr/share/dpkg/pkg-info.mk
+
+EXTRA_SHARED_FLAGS=-Wl,-soname,libflint-$(DEB_VERSION_UPSTREAM).so
 MAKE_OVERRIDE = AT= QUIET_CXX= QUIET_CC= QUIET_AR= INCS=-I$(CURDIR) \
                 ABI_FLAG='$(LDFLAGS)'
 
@@ -29,7 +30,7 @@ endif
 # even for $(CXX)
 override_dh_auto_configure:
 	./configure --prefix="/usr" --with-ntl CFLAGS='$(CPPFLAGS) $(CFLAGS)' --disable-static
-	sed -i Makefile -e "/^FLINT_LIB\>=/s/libflint/libflint-$(VERSION)/"
+	sed -i Makefile -e "/^FLINT_LIB\>=/s/libflint/libflint-$(DEB_VERSION_UPSTREAM)/"
 
 override_dh_auto_build:
 	dh_auto_build --parallel -- $(MAKE_OVERRIDE) \
@@ -38,7 +39,7 @@ override_dh_auto_build:
 
 override_dh_auto_install:
 	dh_auto_install
-	cd debian/tmp/usr/lib ; ln -sf libflint-$(VERSION).so.* libflint-$(VERSION).so
+	cd debian/tmp/usr/lib ; ln -sf libflint-$(DEB_VERSION_UPSTREAM).so.* libflint-$(DEB_VERSION_UPSTREAM).so
 
 override_dh_auto_test:
 	dh_auto_test -- $(MAKE_OVERRIDE)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/flint.git



More information about the debian-science-commits mailing list