git » go-1.20.git » commit e3912ed

upgpkg: 2:1.0.3-1

author Alexander Rødseth
2012-09-28 22:39:44 UTC
committer Alexander Rødseth
2012-09-28 22:39:44 UTC
parent f269666420610436035955cce239bfff11482737

upgpkg: 2:1.0.3-1

PKGBUILD +7 -13

diff --git a/PKGBUILD b/PKGBUILD
index de5faca..31f4779 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,24 +26,18 @@ sha256sums=('7fba3533d172f13629d3d8a79e57c620632b0bd075abe11d7698b338be0ae3df'
             'a03db71d323ed2794123bb31b5c8ad5febd551c490b5c0b341052c8e5f0ba892')
 
 build() {
-  cd "$srcdir/$pkgname"
-  export GOROOT_FINAL="/usr/lib/go"
-  export GOOS=linux
-  export GOARCH=arm
-  cd src
-  bash make.bash
+  if [ "$CARCH" == 'x86_64' ]; then
+    export GOARCH=amd64
+  fi
+  if [ "$CARCH" == 'i686' ]; then
+    export GOARCH=386
+  fi
 
-  cd "$srcdir/$pkgname"
-  export GOROOT_FINAL="/usr/lib/go"
-  export GOOS=linux
-  export GOARCH=386
-  cd src
-  bash make.bash
+  # Set GOARCH to arm for crosscompilation (currently doesn't work)
 
   cd "$srcdir/$pkgname"
   export GOROOT_FINAL="/usr/lib/go"
   export GOOS=linux
-  export GOARCH=amd64
   cd src
   bash make.bash
 }