summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2013-08-19 22:36:24 +0200
committerMichael Stapelberg <michael@stapelberg.de>2013-08-19 22:41:10 +0200
commitfe0163a2479cb19c427e68923938b930e000c2a4 (patch)
tree1e9244269a17735ebc4d598241d252f5823ab14b
parent9bd7b5ec4cd88dfc5c21ea548d750b676be3c22a (diff)
downloadgolang-fe0163a2479cb19c427e68923938b930e000c2a4.tar.gz
compile golang-go-linux-* for each arch
Before this commit, golang-go-* were Architecture: all, meaning that they are built only once on — typically — either an amd64 or i386 machine. However, cgo is only available when building natively, meaning that when building on amd64, only golang-go-linux-amd64 had cgo enabled, or when building on i386, only golang-go-linux-386 had cgo enabled. Given that the packages behave differently depending on which architecture they are compiled, “Architecture: all” is obviously wrong. For golang-go-*-* where * is !linux, this is not a concern, since these packages can _only_ be used when cross-compiling anyway. When golang-go becomes available on more architectures, this needs to be changed.
-rw-r--r--debian/changelog7
-rw-r--r--debian/control6
-rw-r--r--debian/control.cross2
-rwxr-xr-xdebian/rules4
4 files changed, 14 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 0dfdda20d..eaddc3dcb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+golang (2:1.1.2-2) unstable; urgency=low
+
+ * Build golang-go-linux-* for each architecture (Thanks James Page)
+ (Closes: #719611)
+
+ -- Michael Stapelberg <stapelberg@debian.org> Mon, 19 Aug 2013 22:40:54 +0200
+
golang (2:1.1.2-1) unstable; urgency=low
* New upstream release.
diff --git a/debian/control b/debian/control
index cbd1206e3..f21e99f80 100644
--- a/debian/control
+++ b/debian/control
@@ -125,7 +125,7 @@ Description: Go programming language - Vim highlighting syntax files
in Google's Go programming language.
Package: golang-go-linux-amd64
-Architecture: all
+Architecture: i386 amd64 armel armhf
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
Breaks: golang-go (<< 2:1.1-2)
Replaces: golang-go (<< 2:1.1-2)
@@ -143,7 +143,7 @@ Description: Go standard library compiled for linux_amd64
linux_amd64, even though you are executing the Go compiler on linux_386.
Package: golang-go-linux-arm
-Architecture: all
+Architecture: i386 amd64 armel armhf
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
Breaks: golang-go (<< 2:1.1-2)
Replaces: golang-go (<< 2:1.1-2)
@@ -161,7 +161,7 @@ Description: Go standard library compiled for linux_arm
linux_amd64, even though you are executing the Go compiler on linux_386.
Package: golang-go-linux-386
-Architecture: all
+Architecture: i386 amd64 armel armhf
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
Breaks: golang-go (<< 2:1.1-2)
Replaces: golang-go (<< 2:1.1-2)
diff --git a/debian/control.cross b/debian/control.cross
index db6d1a6fc..592b4f94a 100644
--- a/debian/control.cross
+++ b/debian/control.cross
@@ -1,6 +1,6 @@
Package: golang-go-@OS@-@ARCH@
-Architecture: all
+Architecture: @BUILDARCHS@
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
Breaks: golang-go (<< 2:1.1-2)
Replaces: golang-go (<< 2:1.1-2)
diff --git a/debian/rules b/debian/rules
index 694ddfee9..7798cb0c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,7 +49,9 @@ gencontrol:
echo "# DO NOT EDIT THIS FILE. EDIT debian/control.* instead!" > debian/control.tmp
cat debian/control.base >> debian/control.tmp
${FOR_GO_ARCH} \
- sed -e "s,@OS@,$$os,g; s,@ARCH@,$$arch,g" debian/control.cross >> debian/control.tmp; \
+ BUILDARCHS=all; \
+ [ "$$os" = "linux" ] && BUILDARCHS="i386 amd64 armel armhf"; \
+ sed -e "s,@OS@,$$os,g; s,@ARCH@,$$arch,g; s,@BUILDARCHS@,$$BUILDARCHS,g" debian/control.cross >> debian/control.tmp; \
${FOR_GO_ARCH_END}
mv debian/control.tmp debian/control