Go 1.1beta1 works on RPI

This commit is contained in:
Alexander Rødseth 2013-04-08 19:56:19 +01:00
parent 9587441216
commit b9bbbd4890

View file

@ -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 <vegai@iki.fi>
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
@ -7,16 +7,16 @@
# Contributor: Christian Himpel <chressie@gmail.com>
# Contributor: Mike Rosset <mike.rosset@gmail.com>
# Contributor: Daniel YC Lin <dlin.tw@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - added switches for our architectures
# ALARM: Alexander Rødseth <rodseth@gmail.com>
# - 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