summaryrefslogtreecommitdiff
path: root/community/go/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/go/PKGBUILD')
-rw-r--r--community/go/PKGBUILD26
1 files changed, 16 insertions, 10 deletions
diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD
index 06bcb0b3e..8954a068a 100644
--- a/community/go/PKGBUILD
+++ b/community/go/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 80625 2012-11-27 11:18:45Z arodseth $
+# $Id: PKGBUILD 82502 2013-01-19 17:36:30Z arodseth $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
@@ -10,10 +10,10 @@
pkgname=go
pkgver=1.0.3
-pkgrel=4
+pkgrel=5
epoch=2
pkgdesc='Google Go compiler and tools'
-arch=('x86_64' 'i686')
+arch=('x86_64' 'i686' 'armv6h')
url='http://golang.org/'
license=('custom')
depends=('perl' 'gawk')
@@ -31,18 +31,23 @@ build() {
if [ "$CARCH" == 'x86_64' ]; then
export GOARCH=amd64
- fi
- if [ "$CARCH" == 'i686' ]; then
+ elif [ "$CARCH" == 'i686' ]; then
export GOARCH=386
+ else
+ export GOARCH=arm
fi
-
export GOROOT_FINAL=/usr/lib/go
export GOOS=linux
+
cd src
bash make.bash
- # Enable ARM crosscompilation
- export GOARCH=arm
+ # Enable ARM crosscompilation for non-arm platforms
+ if [ "$CARCH" == 'x86_64' ]; then
+ export GOARCH=arm
+ elif [ "$CARCH" == 'i686' ]; then
+ export GOARCH=arm
+ fi
bash make.bash
}
@@ -51,9 +56,10 @@ check() {
if [ "$CARCH" == 'x86_64' ]; then
export GOARCH=amd64
- fi
- if [ "$CARCH" == 'i686' ]; then
+ elif [ "$CARCH" == 'i686' ]; then
export GOARCH=386
+ else
+ export GOARCH=arm
fi
export GOROOT=$srcdir/$pkgname