summaryrefslogtreecommitdiff
path: root/community/go/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-05-03 00:51:22 -0700
committerroot <root@rshg054.dnsready.net>2013-05-03 00:51:22 -0700
commit32b069e79cb891e99962cbac53e2950c11ea403f (patch)
treeccb58e89ee57f636178752583b6f107d0bd36a91 /community/go/PKGBUILD
parent8b09f76ed1ea968a2473faf8f56250eea0fdc3cc (diff)
Fri May 3 00:51:21 PDT 2013
Diffstat (limited to 'community/go/PKGBUILD')
-rw-r--r--community/go/PKGBUILD59
1 files changed, 30 insertions, 29 deletions
diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD
index ab0dd64e4..f2c3a085f 100644
--- a/community/go/PKGBUILD
+++ b/community/go/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 86967 2013-03-25 13:19:54Z arodseth $
+# $Id: PKGBUILD 89827 2013-05-02 17:23:12Z arodseth $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
@@ -7,10 +7,9 @@
# Contributor: Christian Himpel <chressie@gmail.com>
# Contributor: Mike Rosset <mike.rosset@gmail.com>
# Contributor: Daniel YC Lin <dlin.tw@gmail.com>
-
pkgname=go
-pkgver=1.0.3
-pkgrel=7
+pkgver=1.1rc1
+pkgrel=1
epoch=2
pkgdesc='Google Go compiler and tools'
arch=('x86_64' 'i686')
@@ -21,46 +20,48 @@ makedepends=('inetutils')
options=('!strip')
install="$pkgname.install"
backup=('usr/lib/go/bin')
-source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz"
- "$pkgname.sh")
-sha256sums=('7fba3533d172f13629d3d8a79e57c620632b0bd075abe11d7698b338be0ae3df'
+if [ "$CARCH" == 'x86_64' ]; then
+ source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-amd64.tar.gz"
+ "$pkgname.sh")
+ sha256sums=('fc76b716b031d8afba3f3e6bcaca410e8dbf5fb625db5def00fbaaaa960e108c'
'a03db71d323ed2794123bb31b5c8ad5febd551c490b5c0b341052c8e5f0ba892')
+else
+ source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-386.tar.gz"
+ "$pkgname.sh")
+ sha256sums=('b4eb8d9b55ae4a78c86213fa968755163ab3a8efa3f5c9f3a472b182b9d9a52e'
+ 'a03db71d323ed2794123bb31b5c8ad5febd551c490b5c0b341052c8e5f0ba892')
+fi
build() {
- cd "$srcdir/$pkgname"
+ cd "$srcdir/$pkgname/src"
- if [ "$CARCH" == 'x86_64' ]; then
- export GOARCH=amd64
- elif [ "$CARCH" == 'i686' ]; then
- export GOARCH=386
- else
- # A friendly gesture to Arch Linux ARM
- export GOARCH=arm
- fi
export GOROOT_FINAL=/usr/lib/go
- export GOOS=linux
- cd src
+ # Enable ARM crosscompilation for linux
+ export GOOS=linux
+ export GOARCH=arm
bash make.bash
- # 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
+ # Crosscompilation for other platforms too (including linux i686 and x86_64)
+ for os in linux; do # also possible: darwin freebsd windows
+ for arch in amd64 386; do
+ export GOOS=$os
+ export GOARCH=$arch
+ bash make.bash
+ done
+ done
}
check() {
cd "$srcdir/$pkgname"
+ # Only test for linux and the architecture we're on
+ export GOOS=linux
if [ "$CARCH" == 'x86_64' ]; then
export GOARCH=amd64
elif [ "$CARCH" == 'i686' ]; then
export GOARCH=386
else
- # A friendly gesture to Arch Linux ARM
export GOARCH=arm
fi
@@ -86,8 +87,8 @@ package() {
$pkgdir/usr/share/zsh/site-functions/_go
for f in ftdetect/gofiletype.vim autoload/go/complete.vim indent/go.vim \
- ftplugin/go/fmt.vim ftplugin/go/godoc.vim ftplugin/go/import.vim \
- syntax/go.vim syntax/godoc.vim plugin/godoc.vim;
+ ftplugin/go/fmt.vim ftplugin/go/import.vim syntax/go.vim syntax/godoc.vim \
+ plugin/godoc.vim;
do
install -Dm644 misc/vim/$f $pkgdir/usr/share/vim/vimfiles/$f
done
@@ -136,7 +137,7 @@ package() {
install -Dm644 VERSION $pkgdir/usr/lib/go/VERSION
# Clean up
- rm -r "$pkgdir/usr/bin/linux_arm"
+ #rm -r "$pkgdir/usr/bin/linux_arm"
}
# vim:set ts=2 sw=2 et: