Skip to content
Snippets Groups Projects
Commit c03a0bc9 authored by ale's avatar ale
Browse files

install Go for the host architecture

parent aecd869e
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
......@@ -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)/... && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment