go: update to 1.0.2.

This commit is contained in:
Juan RP 2012-07-29 07:59:11 +02:00
parent 04c9beea02
commit 93623f7f20
2 changed files with 76 additions and 25 deletions

View file

@ -1,2 +1 @@
export GOROOT="/opt/go"
export PATH="$PATH:$GOROOT/bin"
export GOPATH=/usr/lib/go/site

View file

@ -1,13 +1,17 @@
# Template file for 'go'
pkgname=go
version=r60.3
depends="make"
makedepends="mercurial ed bison glibc-devel"
version=1.0.2
revision=1
wrksrc=go
nostrip=yes
depends="perl gawk"
makedepends="ed bison"
short_desc="The Go Programming Language"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://golang.org/"
license="BSD"
distfiles="http://go.googlecode.com/files/go${version}.src.tar.gz"
checksum="70fcfb455087c14cc59b7a65c78003fcd1323d73f9b991c1e52db535d6bc95a8"
long_desc="
The Go programming language is an open source project to make programmers
more productive. Go is expressive, concise, clean, and efficient. Its
@ -18,29 +22,77 @@ long_desc="
reflection. It's a fast, statically typed, compiled language that feels like
a dynamically typed, interpreted language."
nofetch=yes
noextract=yes
nostrip=yes
do_fetch() {
local url="https://go.googlecode.com/hg"
hg clone -u ${version} ${url} ${pkgname}-${version}
}
do_build() {
cd ${wrksrc}/src
GOROOT="${wrksrc}/${build_wrksrc}"
GOROOT_FINAL="/opt/go/"
bash ./make.bash
hg --config extensions.purge= purge . --all
cd ${wrksrc}
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOARCH=arm
cd src
bash make.bash
cd ${wrksrc}
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOARCH=386
cd src
bash make.bash
cd ${wrksrc}
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOARCH=amd64
cd src
bash make.bash
}
do_install() {
vmkdir opt/go 755
for i in bin doc misc src lib include pkg;do
vcopy $i opt/go
vinstall LICENSE 644 usr/share/licenses/go
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
vinstall misc/zsh/go 644 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 \
syntax/go.vim syntax/godoc.vim plugin/godoc.vim; do
vinstall misc/vim/$f 644 usr/share/vim/vimfiles
done
vinstall ${FILESDIR}/go.sh 644 etc/profile.d
install -d ${DESTDIR}/{etc/profile.d,usr/{share/go,lib/go,lib/go/src}}
cp -r doc misc -t ${DESTDIR}/usr/share/go
ln -s /usr/share/go/doc ${DESTDIR}/usr/lib/go/doc
cp -a bin ${DESTDIR}/usr
cp -a pkg ${DESTDIR}/usr/lib/go
cp -a src/pkg ${DESTDIR}/usr/lib/go/src/
cp -a src/cmd ${DESTDIR}/usr/lib/go/src/cmd
cp -a src/lib9 ${DESTDIR}/usr/lib/go/src/
cp -a lib ${DESTDIR}/usr/lib/go/
install -Dm644 src/Make.* ${DESTDIR}/usr/lib/go/src
# Remove object files from target src dir
find ${DESTDIR}/usr/lib/go/src/ -type f -name '*.[ao]' -delete
find ${DESTDIR}/usr/lib/go/src/pkg -type f -executable -delete
# Headers for C modules
vinstall src/pkg/runtime/runtime.h 644 usr/lib/go/src/pkg/runtime
vinstall src/pkg/runtime/cgocall.h 644 usr/lib/go/src/pkg/runtime
# For packages that source /etc/profile.d/go.sh
vinstall ${FILESDIR}/go.sh 755 etc/profile.d
# This is to make go get code.google.com/p/go-tour/gotour and
# then running the gotour executable work out of the box.
#
# Also, /usr/bin is the place for system-wide executables,
# not /usr/lib/go/bin. Users should use different paths by
# setting the appropriate environment variables.
#
ln -sf /usr/bin ${DESTDIR}/usr/lib/go/bin
# For godoc
vinstall favicon.ico 644 usr/lib/go
rm -f ${DESTDIR}/usr/share/go/doc/articles/wiki/get.bin
}