Merge pull request #453 from dominikh/fix_go

Improve Go package
This commit is contained in:
Juan RP 2014-07-01 17:01:31 +02:00
commit ab3630b26a
1 changed files with 45 additions and 14 deletions

View File

@ -1,12 +1,12 @@
# Template file for 'go'
pkgname=go
version=1.3
revision=1
revision=2
wrksrc=go
makedepends="ed bison"
depends="perl gawk"
hostmakedepends="mercurial ca-certificates"
depends="perl"
short_desc="The Go Programming Language"
maintainer="Juan RP <xtraeme@gmail.com>"
maintainer="Dominik Honnef <dominik@honnef.co>"
homepage="http://golang.org/"
license="BSD"
distfiles="http://golang.org/dl/go${version}.src.tar.gz"
@ -23,30 +23,61 @@ do_build() {
i686*) export GOHOSTARCH=386;;
x86_64*) export GOHOSTARCH=amd64;;
esac
case "$XBPS_TARGET_MACHINE" in
arm*) targetarch=arm;;
i686*) targetarch=386;;
x86_64*) targetarch=amd64;;
*) targetarch=$GOHOSTARCH;;
esac
case "$XBPS_TARGET_MACHINE" in
armv6l*) export GOARM=6;;
armv7l*) export GOARM=7;;
esac
export GOROOT=$PWD
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOOS=
export GOARCH=
export GOPATH=/tmp
mkdir -p $GOPATH/src
cd src
# ARM build
export GOARCH=arm
bash make.bash
# x86 build
export GOARCH=386
bash make.bash
GOOS=linux
GOARCH=arm
bash make.bash --no-clean
for os in darwin freebsd linux windows; do
for arch in 386 amd64; do
GOARCH=$arch
GOOS=$os
bash make.bash --no-clean
done
done
# x86_64 build
export GOARCH=amd64
bash make.bash
GOOS=linux
GOARCH=$targetarch
hg clone -u release-branch.go${version} \
--config web.cacerts=/etc/ssl/certs/ca-certificates.crt \
https://code.google.com/p/go.tools/ \
$GOPATH/src/code.google.com/p/go.tools
for tool in godoc vet cover; do
$GOROOT/bin/go install code.google.com/p/go.tools/cmd/${tool}
done
}
do_install() {
vinstall LICENSE 644 usr/share/licenses/go
# TODO Beginning with Go 1.4, there will be no editor or shell
# integration in the Go distribution anymore (see
# https://codereview.appspot.com/105470043) - While the emacs
# integration has a canonical upstream at
# https://github.com/dominikh/go-mode.el, neither vim, bash nor
# zsh have one (yet). In any case, there'll need to be made a
# decision between pulling 3rd party integration into this
# package, providing extra packages, or doing nothing at all.
vinstall misc/bash/go 644 usr/share/bash-completion/completions
vinstall misc/emacs/go-mode-load.el 644 usr/share/emacs/site-lisp
vinstall misc/emacs/go-mode.el 644 usr/share/emacs/site-lisp