[Pkg-golang-commits] [golang-defaults] 03/27: add epoch to version so that binaries will replace existing golang packages, update rules hackery to cope

Michael Hudson-Doyle mwhudson-guest at moszumanska.debian.org
Wed Jul 19 21:48:37 UTC 2017


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

mwhudson-guest pushed a commit to tag debian/2%1.6-1ubuntu3
in repository golang-defaults.

commit 8a32670430a3dce42a08158cc5869aa45578fea8
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date:   Mon Mar 7 16:53:53 2016 +1300

    add epoch to version so that binaries will replace existing golang packages, update rules hackery to cope
---
 debian/changelog         |  2 +-
 debian/helpers/getver.pl | 15 +++++++++++++++
 debian/rules             |  4 +---
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8b2826c..47600a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-golang-defaults (1.6ubuntu1) UNRELEASED; urgency=medium
+golang-defaults (3:1.6ubuntu1) UNRELEASED; urgency=medium
 
   * Initial release. (Closes: #XXXXXX)
 
diff --git a/debian/helpers/getver.pl b/debian/helpers/getver.pl
new file mode 100755
index 0000000..ee45ed8
--- /dev/null
+++ b/debian/helpers/getver.pl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+
+# Extract upstream version from version in changelog.
+
+package main;
+
+use warnings;
+use strict;
+
+use Dpkg::Version;
+
+my $v = Dpkg::Version->new(`dpkg-parsechangelog -SVersion`)->version();
+$v =~ /^([0-9]+\.[0-9]+).*/;
+printf("%s\n", $1);
+
diff --git a/debian/rules b/debian/rules
index 4fd78a5..53e0bc5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,7 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-export DH_VERBOSE=1
-
-export GOVER := $(shell dpkg-parsechangelog -SVersion | sed -ne 's/\([0-9]\+\.[0-9]\+\).*$$/\1/p')
+export GOVER := $(shell debian/helpers/getver.pl)
 
 %:
 	dh $@

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



More information about the pkg-golang-commits mailing list