summaryrefslogtreecommitdiff
path: root/community/go/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/go/PKGBUILD')
-rw-r--r--community/go/PKGBUILD32
1 files changed, 19 insertions, 13 deletions
diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD
index 7b9c24ce0..1bb6e6868 100644
--- a/community/go/PKGBUILD
+++ b/community/go/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 72888 2012-06-24 13:42:51Z arodseth $
+# $Id: PKGBUILD 76749 2012-09-28 22:40:14Z arodseth $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
@@ -9,8 +9,8 @@
# Contributor: Daniel YC Lin <dlin.tw@gmail.com>
pkgname=go
-pkgver=1.0.2
-pkgrel=2
+pkgver=1.0.3
+pkgrel=1
epoch=2
pkgdesc='Google Go compiler and tools'
arch=('x86_64' 'i686')
@@ -23,16 +23,22 @@ install=go.install
backup=('usr/lib/go/bin')
source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz"
"$pkgname.sh")
-sha256sums=('70fcfb455087c14cc59b7a65c78003fcd1323d73f9b991c1e52db535d6bc95a8'
+sha256sums=('7fba3533d172f13629d3d8a79e57c620632b0bd075abe11d7698b338be0ae3df'
'a03db71d323ed2794123bb31b5c8ad5febd551c490b5c0b341052c8e5f0ba892')
build() {
- cd "$srcdir/$pkgname"
+ if [ "$CARCH" == 'x86_64' ]; then
+ export GOARCH=amd64
+ fi
+ if [ "$CARCH" == 'i686' ]; then
+ export GOARCH=386
+ fi
+
+ # Set GOARCH to arm for crosscompilation (currently doesn't work)
+ cd "$srcdir/$pkgname"
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
- export GOARCH=arm
-
cd src
bash make.bash
}
@@ -72,12 +78,12 @@ package() {
cp -r doc misc -t "$pkgdir/usr/share/go"
ln -s /usr/share/go/doc "$pkgdir/usr/lib/go/doc"
- cp -r --preserve=timestamps bin "$pkgdir/usr"
- cp -r --preserve=timestamps pkg "$pkgdir/usr/lib/go"
- cp -r --preserve=timestamps $GOROOT/src/pkg "$pkgdir/usr/lib/go/src/"
- cp -r --preserve=timestamps $GOROOT/src/cmd "$pkgdir/usr/lib/go/src/cmd"
- cp -r --preserve=timestamps $GOROOT/src/lib9 "$pkgdir/usr/lib/go/src/"
- cp -r --preserve=timestamps $GOROOT/lib "$pkgdir/usr/lib/go/"
+ cp -a bin "$pkgdir/usr"
+ cp -a pkg "$pkgdir/usr/lib/go"
+ cp -a $GOROOT/src/pkg "$pkgdir/usr/lib/go/src/"
+ cp -a $GOROOT/src/cmd "$pkgdir/usr/lib/go/src/cmd"
+ cp -a $GOROOT/src/lib9 "$pkgdir/usr/lib/go/src/"
+ cp -a $GOROOT/lib "$pkgdir/usr/lib/go/"
install -Dm644 src/Make.* "$pkgdir/usr/lib/go/src"