author | Rémy Oudompheng
<remy@archlinux.org> 2012-05-11 22:49:48 UTC |
committer | Rémy Oudompheng
<remy@archlinux.org> 2012-05-11 22:49:48 UTC |
parent | e673feb788e9d87c471bcd4e694a7bad8a9e632f |
PKGBUILD | +19 | -27 |
go.run | +0 | -8 |
go.sh | +0 | -1 |
diff --git a/PKGBUILD b/PKGBUILD index 6639582..939ab93 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ pkgname=go pkgver=1.0.1 -pkgrel=2 +pkgrel=3 epoch=2 pkgdesc='Google Go compiler and tools (release version)' arch=('x86_64' 'i686') @@ -18,26 +18,23 @@ depends=('perl' 'gawk') makedepends=('inetutils') options=('!strip' '!emptydirs') install=go.install -source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz" - "$pkgname.run" - "$pkgname.sh") -sha1sums=('fc8a6d6725f7f2bf7c94685c5fd0880c9b7f67f6' - '655754d95688294b0cf2334a1155432884f92859' - 'a760c32cbad5a013f384a086efb3b8b8fd88794f') +source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz") +sha1sums=('fc8a6d6725f7f2bf7c94685c5fd0880c9b7f67f6') build() { cd "$srcdir/$pkgname" - - export GOROOT="$srcdir/$pkgname" - export GOOS_FINAL="/usr/lib/go" + export GOROOT_FINAL="/usr/lib/go" export GOOS=linux - export GOBIN="$GOROOT/bin" - export PATH="$GOBIN:$PATH" - mkdir -p "$GOROOT/bin" - cd "$GOROOT/src" + cd src && bash make.bash +} - . ./all.bash +check() { + # TestSimpleMulticastListener will fail in standard chroot. + cd "$srcdir/$pkgname" + export GOROOT="$srcdir/$pkgname" + export PATH="$srcdir/$pkgname/bin:$PATH" + cd src && bash run.bash --no-rebuild || true } package() { @@ -63,14 +60,14 @@ package() { mkdir -p $pkgdir/{etc/profile.d,usr/{share/go,lib/go,lib/go/src}} - cp -r bin $pkgdir/usr cp -r doc misc -t $pkgdir/usr/share/go ln -s /usr/share/go/doc $pkgdir/usr/lib/go/doc - cp -r pkg $pkgdir/usr/lib/go - cp -r $GOROOT/src/pkg $pkgdir/usr/lib/go/src/ - cp -r $GOROOT/src/cmd $pkgdir/usr/lib/go/src/cmd - cp -r $GOROOT/src/lib9 $pkgdir/usr/lib/go/src/ - cp -r $GOROOT/lib $pkgdir/usr/lib/go/ + cp -r --preserve=timestamps bin $pkgdir/usr + cp -r --preserve=timestamps pkg $pkgdir/usr/lib/go + cp -r --preserve=timestamps $GOROOT/src/pkg $pkgdir/usr/lib/go/src/ + cp -r --preserve=timestamps $GOROOT/src/cmd $pkgdir/usr/lib/go/src/cmd + cp -r --preserve=timestamps $GOROOT/src/lib9 $pkgdir/usr/lib/go/src/ + cp -r --preserve=timestamps $GOROOT/lib $pkgdir/usr/lib/go/ install -Dm644 src/Make.* $pkgdir/usr/lib/go/src @@ -84,12 +81,7 @@ package() { install -Dm644 src/pkg/runtime/cgocall.h \ $pkgdir/usr/lib/go/src/pkg/runtime/cgocall.h - install $srcdir/go.sh $pkgdir/etc/profile.d/ - - mv "$pkgdir/usr/bin/go" "$pkgdir/usr/bin/go.elf" - install -Dm755 "$srcdir/go.run" "$pkgdir/usr/bin/go" - - rm "$pkgdir/usr/share/go/doc/articles/wiki/get.bin" + rm -f "$pkgdir/usr/share/go/doc/articles/wiki/get.bin" } # vim:set ts=2 sw=2 et: diff --git a/go.run b/go.run deleted file mode 100644 index 2f68ce8..0000000 --- a/go.run +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -if [[ -z $GOROOT ]]; then - export GOROOT=/usr/lib/go -fi -if [[ -z $GOROOT_FINAL ]]; then - export GOROOT_FINAL=$GOROOT -fi -/usr/bin/go.elf "$@" diff --git a/go.sh b/go.sh deleted file mode 100644 index 8393dc8..0000000 --- a/go.sh +++ /dev/null @@ -1 +0,0 @@ -export GOROOT=/usr/lib/go