[Pkg-golang-commits] [golang] 01/15: - Build empty golang-go and golang-src packages on architectures without golang support and depend on gccgo instead (see Debian bug #780355).
Michael Hudson-Doyle
mwhudson-guest at moszumanska.debian.org
Tue Mar 1 02:57:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
mwhudson-guest pushed a commit to branch ubuntu-trusty-golang-1.6
in repository golang.
commit c4d57dd44f92f82d56226b9b7f07016fb7c491e0
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date: Fri Feb 12 10:12:50 2016 +1300
- Build empty golang-go and golang-src packages on architectures without golang support and depend on gccgo instead (see Debian bug #780355).
---
debian/control | 7 ++++---
debian/rules | 23 +++++++++++++++++++++++
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/debian/control b/debian/control
index d54a1c1..b64710d 100644
--- a/debian/control
+++ b/debian/control
@@ -14,11 +14,12 @@ Standards-Version: 3.9.6
Homepage: https://golang.org
Package: golang-go
-Architecture: amd64 arm64 armel armhf i386 ppc64 ppc64el
+Architecture: any
Depends: golang-src (>= ${source:Version}),
${misc:Depends},
${perl:Depends},
- ${shlibs:Depends}
+ ${shlibs:Depends},
+ gccgo [!armel !armhf !amd64 !i386 !arm64 !ppc64 !ppc64el]
Breaks: golang-go-darwin-386,
golang-go-darwin-amd64,
golang-go-freebsd-386,
@@ -69,7 +70,7 @@ Description: Go programming language compiler, linker, compiled stdlib
pre-compile the standard library inside GOROOT for cross-compilation to work.
Package: golang-src
-Architecture: amd64 arm64 armel armhf i386 ppc64 ppc64el
+Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Go programming language - source files
The Go programming language is an open source project to make programmers more
diff --git a/debian/rules b/debian/rules
index d3ff260..56f4035 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,14 @@ ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
RUN_TESTS := false
endif
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+golang_archs = armel armhf amd64 i386 arm64 ppc64 ppc64el
+IS_GOLANG_ARCH := true
+ifeq (,$(filter $(DEB_HOST_ARCH),$(golang_archs)))
+ IS_GOLANG_ARCH := false
+ RUN_TESTS := false
+endif
+
%:
+dh --parallel $(opt_no_act) $@
@@ -55,6 +63,7 @@ override_dh_install-indep:
dh_install --fail-missing
override_dh_install-arch:
+ifeq (true, $(IS_GOLANG_ARCH))
dh_install --fail-missing
# Remove Plan9 rc(1) scripts
find debian/golang-src/usr/share/go/src -type f -name '*.rc' -delete
@@ -63,20 +72,34 @@ override_dh_install-arch:
# Touch built and installed files and directories to have same timestamp
touch debian/golang-go/usr/lib/go/pkg
find debian/golang-go/usr/lib/go/pkg -exec touch -r $(CURDIR)/debian/golang-go/usr/lib/go/pkg {} \;
+endif
override_dh_strip:
# strip disabled as golang upstream doesn't support it and it makes go
# crash. See http://bugs.debian.org/717172
+override_dh_installdeb:
+ dh_installdeb
+ifeq (false, $(IS_GOLANG_ARCH))
+ : # these are empty dependency packages
+ rm -f debian/golang-go/DEBIAN/p*
+ rm -rf debian/golang-go/usr/share/man
+ install -d -m 755 debian/golang-src/usr/share/go/src
+ install -d -m 755 debian/golang-src/usr/share/go/include
+ install -d -m 755 debian/golang-src/usr/share/go/test
+endif
+
override_dh_shlibdeps:
dh_shlibdeps -Xtestdata -Xtest
override_dh_auto_build-arch:
+ifeq (true, $(IS_GOLANG_ARCH))
[ -f VERSION ] || echo "debian snapshot +$$(dpkg-parsechangelog -SVersion)" > VERSION
export GOROOT_BOOTSTRAP=$$(env -i go env GOROOT) \
&& cd src \
&& $(CURDIR)/debian/helpers/goenv.sh \
bash ./make.bash --no-banner
+endif
opt_no_act :=
ifneq (,$(findstring n,$(MAKEFLAGS)))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git
More information about the pkg-golang-commits
mailing list