[DRE-commits] [ruby-mocha] 08/11: Use DEB_VERSION_UPSTREAM dpkg variable to read upstream version in debian/rules

Cédric Boutillier boutil at moszumanska.debian.org
Thu Jul 6 22:58:31 UTC 2017


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

boutil pushed a commit to branch master
in repository ruby-mocha.

commit f692d13fc33efe0c37b994f9d961238ed7d360d9
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri Jul 7 00:07:09 2017 +0200

    Use DEB_VERSION_UPSTREAM dpkg variable to read upstream version in debian/rules
---
 debian/changelog | 2 ++
 debian/rules     | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5bcda5c..3d31079 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ ruby-mocha (1.2.1-1) unstable; urgency=medium
   * Bump Standards-Version to 4.0.0 (no changes needed)
   * Update reference to homepage
   * Make gem2deb test dependencies when running the tests
+  * Use DEB_VERSION_UPSTREAM dpkg variable to read upstream version in
+    debian/rules
 
  -- Cédric Boutillier <boutil at debian.org>  Thu, 06 Jul 2017 23:56:21 +0200
 
diff --git a/debian/rules b/debian/rules
index ad9ab49..853564a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,8 @@
 #!/usr/bin/make -f
 
-export GEM2DEB_TEST_RUNNER = --check-dependencies
+include /usr/share/dpkg/pkg-info.mk
 
-UPSTREAM_VERSION := $(shell dpkg-parsechangelog | grep "^Version:" | cut -d\  -f2 | cut -d- -f1)
+export GEM2DEB_TEST_RUNNER = --check-dependencies
 
 %:
 	dh $@ --buildsystem=ruby --with ruby
@@ -11,7 +11,7 @@ override_dh_installchangelogs:
 	dh_installchangelogs RELEASE.md -O--buildsystem=ruby
 
 override_dh_install:
-	yard --title "Mocha $(UPSTREAM_VERSION)"
+	yard --title "Mocha $(DEB_VERSION_UPSTREAM)"
 	dh_install
 	# do not install bin/build-matrix
 	rm -rf debian/ruby-mocha/usr/bin

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



More information about the Pkg-ruby-extras-commits mailing list