From b9bbbd48909d7be25d3a25eaf97bda6cc7ba813d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20R=C3=B8dseth?= Date: Mon, 8 Apr 2013 19:56:19 +0100 Subject: [PATCH] Go 1.1beta1 works on RPI --- community/go/PKGBUILD | 75 ++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 51 deletions(-) diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD index 02ec3331e..1fb8ea375 100644 --- a/community/go/PKGBUILD +++ b/community/go/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 79946 2012-11-15 01:53:41Z arodseth $ +# $Id: PKGBUILD 86967 2013-03-25 13:19:54Z arodseth $ # Maintainer: Vesa Kaihlavirta # Maintainer: Alexander Rødseth # Contributor: Rémy Oudompheng @@ -7,16 +7,16 @@ # Contributor: Christian Himpel # Contributor: Mike Rosset # Contributor: Daniel YC Lin - # ALARM: Kevin Mihelich # - added switches for our architectures +# ALARM: Alexander Rødseth +# - Go 1.1beta1 support pkgname=go -pkgver=1.0.3 -pkgrel=7 +pkgver=1.1beta1 +pkgrel=1 epoch=2 pkgdesc='Google Go compiler and tools' -arch=('x86_64' 'i686') url='http://golang.org/' license=('custom') depends=('perl' 'gawk') @@ -25,71 +25,42 @@ options=('!strip') install="$pkgname.install" backup=('usr/lib/go/bin') source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz" - $pkgname.sh) -sha256sums=('7fba3533d172f13629d3d8a79e57c620632b0bd075abe11d7698b338be0ae3df' + "$pkgname.sh") +sha256sums=('feb5af0f73ee8d377577ac7c250919e911139821fae8e0ce365d235f87297f84' 'a03db71d323ed2794123bb31b5c8ad5febd551c490b5c0b341052c8e5f0ba892') build() { - cd $srcdir/$pkgname + cd "$srcdir/$pkgname" - if [ "$CARCH" == 'x86_64' ]; then - export GOARCH=amd64 - fi - if [ "$CARCH" == 'i686' ]; then - export GOARCH=386 - fi - if [ "$CARCH" == 'arm' ]; then - export GOARCH=arm - export GOARM=5 - fi - if [ "$CARCH" == 'armv6h' ]; then - export GOARCH=arm - export GOARM=6 - fi - if [ "$CARCH" == 'armv7h' ]; then - export GOARCH=arm - export GOARM=7 - fi + [ "$CARCH" == 'arm' ] && export GOARM=5 + [ "$CARCH" == 'armv6h' ] && export GOARM=6 + [ "$CARCH" == 'armv7h' ] && export GOARM=7 + export GOARCH=arm export GOROOT_FINAL=/usr/lib/go export GOOS=linux + cd src bash make.bash } check() { - cd $srcdir/$pkgname + cd "$srcdir/$pkgname" - if [ "$CARCH" == 'x86_64' ]; then - export GOARCH=amd64 - fi - if [ "$CARCH" == 'i686' ]; then - export GOARCH=386 - fi - if [ "$CARCH" == 'arm' ]; then - export GOARCH=arm - export GOARM=5 - fi - if [ "$CARCH" == 'armv6h' ]; then - export GOARCH=arm - export GOARM=6 - fi - if [ "$CARCH" == 'armv7h' ]; then - export GOARCH=arm - export GOARM=7 - fi + [ "$CARCH" == 'arm' ] && export GOARM=5 + [ "$CARCH" == 'armv6h' ] && export GOARM=6 + [ "$CARCH" == 'armv7h' ] && export GOARM=7 - export GOROOT=$srcdir/$pkgname - export PATH=$srcdir/$pkgname/bin:$PATH + export GOARCH=arm + export GOROOT="$srcdir/$pkgname" + export PATH="$srcdir/$pkgname/bin:$PATH" # TestSimpleMulticastListener will fail in standard chroot. cd src && bash run.bash --no-rebuild || true } package() { - cd $srcdir/$pkgname - - export GOROOT=$srcdir/$pkgname + cd "$srcdir/$pkgname" install -Dm644 LICENSE \ $pkgdir/usr/share/licenses/go/LICENSE @@ -103,7 +74,7 @@ package() { $pkgdir/usr/share/zsh/site-functions/_go for f in ftdetect/gofiletype.vim autoload/go/complete.vim indent/go.vim \ - ftplugin/go/fmt.vim ftplugin/go/godoc.vim ftplugin/go/import.vim \ + ftplugin/go/fmt.vim ftplugin/go/import.vim \ syntax/go.vim syntax/godoc.vim plugin/godoc.vim; do install -Dm644 misc/vim/$f $pkgdir/usr/share/vim/vimfiles/$f @@ -125,8 +96,10 @@ package() { # Remove object files from target src dir find $pkgdir/usr/lib/go/src/ -type f -name '*.[ao]' -delete + # Fix for FS#32813 find $pkgdir -type f -name sql.go -exec chmod -x {} \; + # Remove all executable source files find $pkgdir/usr/lib/go/src/pkg -type f -executable -delete