diff --git a/debian/install-golang b/debian/install-golang index f89851ff271a6d2e346317b3165a81f77527d7b0..7ea0574a28b70248f3f4d61ad89892938b8f7cdb 100755 --- a/debian/install-golang +++ b/debian/install-golang @@ -3,16 +3,16 @@ # Install Go. # -get_arch() { - case $(uname -m) in +mangle_arch() { + case $1 in i686) echo 386 ;; - x86_64) echo amd64 ;; + *) echo $1 ;; esac } -ROOT="${1}" -VERSION="${2}" -ARCH=$(get_arch) +ROOT="$1" +ARCH=`mangle_arch $2` +VERSION="$3" DL_URL=https://go.googlecode.com/files/go${VERSION}.linux-${ARCH}.tar.gz mkdir -p ${ROOT} diff --git a/debian/rules b/debian/rules index 7ae7881dabdf00e43248e84b8f5974b2f772276b..4ceff66ef3fc55a51676c86fc87fd788498c6c09 100755 --- a/debian/rules +++ b/debian/rules @@ -26,7 +26,7 @@ override_dh_install: install -m 755 -o root -g root -d $(DEBDIR)/localauditd/usr/sbin (export GOPATH=$(BUILDDIR) GOROOT=$(GOROOT) ; \ mkdir -p $(GOROOT) $(BUILDDIR)/src/$(GOPKG) ; \ - sh $(CURDIR)/debian/install-golang $(GOROOT) $(GO_VERSION) ; \ + sh $(CURDIR)/debian/install-golang $(GOROOT) $(DEB_HOST_ARCH) $(GO_VERSION) ; \ rsync -a --exclude=debian --exclude=.git $(CURDIR)/ $(BUILDDIR)/src/$(GOPKG)/ ; \ cd $(BUILDDIR)/src && \ $(GOROOT)/bin/go get -d -v ./$(GOPKG)/... && \