community/go to 1.2.1-1

This commit is contained in:
Kevin Mihelich 2014-03-03 18:32:22 +00:00
parent 0eb2860cb2
commit 04cdeb487c
3 changed files with 18 additions and 30 deletions

View file

@ -14,27 +14,24 @@
# - Go 1.1beta2 support
pkgname=go
pkgver=1.2
pkgrel=3
pkgver=1.2.1
pkgrel=1
epoch=2
pkgdesc='Compiler and tools for the Go programming language from Google'
url='http://golang.org/'
license=('custom')
depends=('perl' 'gawk')
makedepends=('inetutils')
makedepends=('inetutils' 'mercurial')
options=('!strip' 'staticlibs')
optdepends=('liteide: IDE for editing and building projects written in Go'
'mercurial: Version control system written in Python'
'git: Version control system written in C')
'mercurial: VCS written in Python'
'git: VCS written in C')
install="$pkgname.install"
backup=('usr/lib/go/bin')
source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz"
'go.sh')
sha256sums=('9ab83fb8eafe39f4204ef0f8e84e5ff7e8f1d533ddb05f51e6dc81503e8c0ae4'
'b6209904c88bde96efcac846c267e308e4dc39c8a45f2690204c2175de4b9b0a')
source=("$pkgname-$pkgver::hg+https://code.google.com/p/$pkgname#branch=release-branch.$pkgname${pkgver/.1}")
md5sums=('SKIP')
build() {
cd "$pkgname/src"
cd "$pkgname-$pkgver/src"
[ "$CARCH" == 'arm' ] && export GOARM=5
[ "$CARCH" == 'armv6h' ] && export GOARM=6
@ -45,25 +42,28 @@ build() {
export GOOS=linux
bash make.bash
# TODO: Find a way to install these tools as well:
#go get code.google.com/p/go.tools/cmd/...
}
check() {
cd "$pkgname"
cd "$pkgname-$pkgver"
[ "$CARCH" == 'arm' ] && export GOARM=5
[ "$CARCH" == 'armv6h' ] && export GOARM=6
[ "$CARCH" == 'armv7h' ] && export GOARM=7
export GOARCH=arm
export GOROOT="$srcdir/$pkgname"
export PATH="$srcdir/$pkgname/bin:$PATH"
export GOROOT="$srcdir/$pkgname-$pkgver"
export PATH="$srcdir/$pkgname-$pkgver/bin:$PATH"
# TestSimpleMulticastListener will fail in standard chroot
cd src && bash run.bash --no-rebuild || true
}
package() {
cd "$pkgname"
cd "$pkgname-$pkgver"
export GOROOT="$srcdir/$pkgname"
@ -115,7 +115,9 @@ package() {
install -Dm644 src/pkg/runtime/cgocall.h \
"$pkgdir/usr/lib/go/src/pkg/runtime/cgocall.h"
# In order to make godoc work, see FS#38597
# Set GOROOT since /usr/lib/go is not a standard location,
# (http://golang.org/doc/install/source) and may also make godoc work
# for some instances where it otherwise does not work. (FS#38597)
install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/etc/profile.d/$pkgname.sh"
# This is to make go get code.google.com/p/go-tour/gotour and

View file

@ -8,19 +8,6 @@ post_install() {
echo ' export PATH=$PATH:~/go/bin'
echo ' go get code.google.com/p/go-tour/gotour'
echo
echo 'For adding useful go tools:'
echo
echo ' go get code.google.com/p/go.tools/cmd/benchcmp'
echo ' go get code.google.com/p/go.tools/cmd/cover'
echo ' go get code.google.com/p/go.tools/cmd/godoc'
echo ' go get code.google.com/p/go.tools/cmd/goimports'
echo ' go get code.google.com/p/go.tools/cmd/gotype'
echo ' go get code.google.com/p/go.tools/cmd/html2article'
echo ' go get code.google.com/p/go.tools/cmd/ssadump'
echo ' go get code.google.com/p/go.tools/cmd/vet'
echo
echo '#go-nuts at irc.freenode.net may provide more answers.'
echo
}
# vim:set ts=2 sw=2 et:

View file

@ -1 +0,0 @@
export GOROOT=/usr/lib/go