author | Alexander Rødseth
<xyproto@archlinux.org> 2012-05-16 12:05:49 UTC |
committer | Alexander Rødseth
<xyproto@archlinux.org> 2012-05-16 12:05:49 UTC |
parent | 40a356d40b07a3b043caa9ce3c9c465eed060e29 |
PKGBUILD | +28 | -20 |
go.sh | +2 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 939ab93..c6b3223 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,14 +1,15 @@ # Maintainer: Vesa Kaihlavirta <vegai@iki.fi> # Maintainer: Alexander Rødseth <rodseth@gmail.com> +# Contributor: Rémy Oudompheng <remy@archlinux.org> # Contributor: Andres Perera <andres87p gmail> # Contributor: Matthew Bauer <mjbauer95@gmail.com> -# Contributor: Christian Himpel <chressie at gmail dot com> +# Contributor: Christian Himpel <chressie@gmail.com> # Contributor: Mike Rosset <mike.rosset@gmail.com> # Contributor: Daniel YC Lin <dlin.tw@gmail.com> pkgname=go pkgver=1.0.1 -pkgrel=3 +pkgrel=4 epoch=2 pkgdesc='Google Go compiler and tools (release version)' arch=('x86_64' 'i686') @@ -18,22 +19,27 @@ depends=('perl' 'gawk') makedepends=('inetutils') options=('!strip' '!emptydirs') install=go.install -source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz") -sha1sums=('fc8a6d6725f7f2bf7c94685c5fd0880c9b7f67f6') +source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz" + "$pkgname.sh") +sha1sums=('fc8a6d6725f7f2bf7c94685c5fd0880c9b7f67f6' + '75ff86617eecec4a3a21a99e34f130ba0fa78cad') build() { cd "$srcdir/$pkgname" + export GOROOT_FINAL="/usr/lib/go" export GOOS=linux - cd src && bash make.bash + cd src && bash make.bash } check() { - # TestSimpleMulticastListener will fail in standard chroot. cd "$srcdir/$pkgname" + export GOROOT="$srcdir/$pkgname" export PATH="$srcdir/$pkgname/bin:$PATH" + + # TestSimpleMulticastListener will fail in standard chroot. cd src && bash run.bash --no-rebuild || true } @@ -58,28 +64,30 @@ package() { install -Dm644 "misc/vim/$f" "$pkgdir/usr/share/vim/vimfiles/$f" done - mkdir -p $pkgdir/{etc/profile.d,usr/{share/go,lib/go,lib/go/src}} + mkdir -p "$pkgdir/"{etc/profile.d,usr/{share/go,lib/go,lib/go/src}} - cp -r doc misc -t $pkgdir/usr/share/go - ln -s /usr/share/go/doc $pkgdir/usr/lib/go/doc - 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/ + cp -r doc misc -t "$pkgdir/usr/share/go" + ln -s /usr/share/go/doc "$pkgdir/usr/lib/go/doc" + 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 + install -Dm644 src/Make.* "$pkgdir/usr/lib/go/src" # Remove object files from target src dir - find $pkgdir/usr/lib/go/src/ -type f -name '*.[ao]' -delete - find $pkgdir/usr/lib/go/src/pkg -type f -executable -delete + find "$pkgdir/usr/lib/go/src/" -type f -name '*.[ao]' -delete + find "$pkgdir/usr/lib/go/src/pkg" -type f -executable -delete # Headers for C modules install -Dm644 src/pkg/runtime/runtime.h \ - $pkgdir/usr/lib/go/src/pkg/runtime/runtime.h + "$pkgdir/usr/lib/go/src/pkg/runtime/runtime.h" install -Dm644 src/pkg/runtime/cgocall.h \ - $pkgdir/usr/lib/go/src/pkg/runtime/cgocall.h + "$pkgdir/usr/lib/go/src/pkg/runtime/cgocall.h" + + install -Dm644 "$srcdir/go.sh" "$pkgdir/etc/profile.d/" rm -f "$pkgdir/usr/share/go/doc/articles/wiki/get.bin" } diff --git a/go.sh b/go.sh new file mode 100644 index 0000000..fdf5110 --- /dev/null +++ b/go.sh @@ -0,0 +1,2 @@ +# Where to install system-wide packages +export GOROOT=/usr/lib/go/site