diff --git a/debian/changelog b/debian/changelog
index 5a7b1f9..d92b257 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dh-golang (1.12ubuntu1) xenial; urgency=medium
+
+ * Follow /usr/bin/go symlink when computing Built-Using. (LP: #1564124)
+
+ -- Michael Hudson-Doyle <michael.hudson@canonical.com> Thu, 31 Mar 2016 11:42:07 +1300
+
dh-golang (1.12) unstable; urgency=medium
[ Hilko Bengen ]
diff --git a/script/dh_golang b/script/dh_golang
index fad7998..cfc56d3 100755
--- a/script/dh_golang
+++ b/script/dh_golang
@@ -111,8 +111,10 @@ if (defined($build_depends) && $build_depends ne '') {
map { flatten($_) }
$deps->get_deps());
if ($golang_deps ne '') {
- $built_using = `dpkg-query -f='\${source:Package} (= \${source:Version}), ' -W $golang_deps`;
+ $golang_deps .= " ";
}
+ $golang_deps .= `dpkg-query --search \$(readlink -f \$(which go)) | cut -d: -f1`;
+ $built_using = `dpkg-query -f='\${source:Package} (= \${source:Version}), ' -W $golang_deps`;
}
# If there is an easier way to have a universal misc:Built-Using on all binary