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

Alexander Rødseth arodseth at nymeria.archlinux.org
Thu Mar 6 11:44:31 UTC 2014


    Date: Thursday, March 6, 2014 @ 12:44:30
  Author: arodseth
Revision: 106675

Fix for FS#38860.

Modified:
  go/trunk/PKGBUILD

----------+
 PKGBUILD |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-03-06 11:42:49 UTC (rev 106674)
+++ PKGBUILD	2014-03-06 11:44:30 UTC (rev 106675)
@@ -10,7 +10,7 @@
 
 pkgname=go
 pkgver=1.2.1
-pkgrel=1
+pkgrel=2
 epoch=2
 pkgdesc='Compiler and tools for the Go programming language from Google'
 arch=('x86_64' 'i686')
@@ -46,15 +46,20 @@
 
   # Crosscompilation for various platforms (including linux)
   for os in linux; do # darwin freebsd windows; do
-    for arch in amd64 386; do
+    for platform in amd64 386; do
       export GOOS="$os"
-      export GOARCH="$arch"
+      export GOARCH="$platform"
       bash make.bash --no-clean
+
+      if [ $platform$CARCH == amd64x86_64 -o $platform$CARCH == 386i686 ]; then
+        # Many thanks to Daniel YC Lin
+        ../bin/go get -d code.google.com/p/go.tools/cmd/godoc
+        ../bin/go build -o "$srcdir/godoc" code.google.com/p/go.tools/cmd/godoc
+        ../bin/go get -d code.google.com/p/go.tools/cmd/vet
+        ../bin/go build -o ../pkg/tool/$platform/vet code.google.com/p/go.tools/cmd/vet
+      fi
     done
   done
-
-  # TODO: Find a way to install these tools as well:
-  #go get code.google.com/p/go.tools/cmd/...
 }
 
 check() {
@@ -79,6 +84,10 @@
 package() {
   cd "$pkgname-$pkgver"
 
+  export GOROOT="$srcdir/$pkgname-$pkgver"
+
+  install -Dm755 ../godoc "$pkgdir/usr/bin/godoc"
+
   install -Dm644 LICENSE \
     "$pkgdir/usr/share/licenses/go/LICENSE"
   install -Dm644 misc/bash/go \




More information about the arch-commits mailing list