Date: Wednesday, February 26, 2014 @ 18:47:34 Author: arodseth Revision: 106292
Fix for FS#38860, including go tools Modified: go/trunk/PKGBUILD ----------+ PKGBUILD | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2014-02-26 16:22:54 UTC (rev 106291) +++ PKGBUILD 2014-02-26 17:47:34 UTC (rev 106292) @@ -10,7 +10,7 @@ pkgname=go pkgver=1.2 -pkgrel=4 +pkgrel=3 epoch=2 pkgdesc='Compiler and tools for the Go programming language from Google' arch=('x86_64' 'i686') @@ -17,6 +17,7 @@ url='http://golang.org/' license=('custom') depends=('perl' 'gawk') +# Depends on itself when building, in order to include the go tools makedepends=('inetutils' 'mercurial' 'go') options=('!strip' 'staticlibs') optdepends=('liteide: IDE for editing and building projects written in Go' @@ -52,6 +53,22 @@ bash make.bash --no-clean done done + + + # Build the go tools (like vet and cover) + # Working methods to do the same that does not rely on "go get" are warmly welcome, + # just create a feature request and include your solution. + + export GOROOT="$srcdir/$pkgname-$pkgver" + export PATH="$srcdir/$pkgname-$pkgver/bin:$PATH" + + if [ "$CARCH" == 'x86_64' ]; then + export GOARCH=amd64 + elif [ "$CARCH" == 'i686' ]; then + export GOARCH=386 + fi + + go get code.google.com/p/go.tools/cmd/... } check() { @@ -136,25 +153,6 @@ install -Dm644 VERSION "$pkgdir/usr/lib/go/VERSION" find "$pkgdir/usr/"{lib/go/pkg,bin} -type f -exec touch '{}' + - - # Needed tools - if [ "$CARCH" == 'x86_64' ]; then - export GOARCH=amd64 - elif [ "$CARCH" == 'i686' ]; then - export GOARCH=386 - fi - export GOROOT="$srcdir/$pkgname-$pkgver" - export PATH="$srcdir/$pkgname-$pkgver/bin:$PATH" - for cmd in cover godoc vet; do - go get code.google.com/p/go.tools/cmd/$cmd - find "$srcdir" -name $cmd -type f -exec cp '{}' "$pkgdir/usr/bin/$cmd" - done - # TODO: Figure out which of these are really needed - cp -ruv "$GOROOT/src/pkg" "$pkgdir/usr/lib/go/src/" - cp -ruv "$GOROOT/src/cmd" "$pkgdir/usr/lib/go/src/cmd" - cp -ruv "$GOROOT/src/lib9" "$pkgdir/usr/lib/go/src/" - cp -ruv "$GOROOT/lib" "$pkgdir/usr/lib/go/" - cp -ruv "$GOROOT/include" "$pkgdir/usr/lib/go/" } # vim:set ts=2 sw=2 et: