[arch-commits] Commit in go/trunk (PKGBUILD)

Alexander Rødseth arodseth at nymeria.archlinux.org
Thu May 2 14:15:35 UTC 2013


    Date: Thursday, May 2, 2013 @ 16:15:35
  Author: arodseth
Revision: 89812

Upgrade to Go 1.1rc1

Modified:
  go/trunk/PKGBUILD

----------+
 PKGBUILD |   52 ++++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-05-02 13:55:03 UTC (rev 89811)
+++ PKGBUILD	2013-05-02 14:15:35 UTC (rev 89812)
@@ -7,9 +7,8 @@
 # Contributor: Christian Himpel <chressie at gmail.com>
 # Contributor: Mike Rosset <mike.rosset at gmail.com>
 # Contributor: Daniel YC Lin <dlin.tw at gmail.com>
-
 pkgname=go
-pkgver=1.1
+pkgver=1.1rc1
 pkgrel=1
 epoch=2
 pkgdesc='Google Go compiler and tools'
@@ -21,47 +20,48 @@
 options=('!strip')
 install="$pkgname.install"
 backup=('usr/lib/go/bin')
-source=('http://go.googlecode.com/files/go1.1beta1.linux-amd64.tar.gz'
-        "$pkgname.sh")
-#source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz"
-sha256sums=('a0ab2aeb1e7845ee9d93c1c52fa62af1956bb903e243d78322000b99fcfd595f'
+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
+
+  # Enable ARM crosscompilation for linux
   export GOOS=linux
-
-  cd src
+  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
 
@@ -137,7 +137,7 @@
   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:




More information about the arch-commits mailing list