diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/go |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/go')
-rw-r--r-- | community/go/PKGBUILD | 84 | ||||
-rw-r--r-- | community/go/go.install | 5 | ||||
-rwxr-xr-x | community/go/go.sh | 3 |
3 files changed, 92 insertions, 0 deletions
diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD new file mode 100644 index 000000000..55f26f725 --- /dev/null +++ b/community/go/PKGBUILD @@ -0,0 +1,84 @@ +# $Id$ +# Maintainer: Vesa Kaihlavirta <vegai@iki.fi> +# Contributor: Andres Perera <andres87p gmail> +# Contributor: Matthew Bauer <mjbauer95@gmail.com> +# Contributor: Christian Himpel <chressie at gmail dot com> + +pkgname=go +pkgver=2011_02_15 +_pkgver=2011-02-15 +pkgrel=1 +pkgdesc='Google Go compiler and tools (release version)' +arch=('i686' 'x86_64') +url="http://golang.org/" +license=('custom') +depends=('perl' 'ed') +makedepends=('mercurial') +options=('!strip') +install=$pkgname.install +source=($pkgname.sh) +md5sums=('67c472bfcfdb760d1d1f0a87cfe3661f') + +build() { + _hgroot="https://go.googlecode.com/hg/" + _hgrepo="release" + + cd "$srcdir" + msg "Connecting to Mercurial server...." + + if [ -d $_hgrepo ] ; then + cd $_hgrepo + hg pull -u + msg "The local files are updated." + else + hg clone $_hgroot $_hgrepo + fi + + msg "Mercurial checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$_hgrepo-build" + cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" + cd "$srcdir/$_hgrepo-build" + + export GOROOT="$srcdir/$_hgrepo-build" + export GOOS=linux + export GOBIN="$GOROOT/bin" + export PATH="$GOBIN:$PATH" + + mkdir -p "$GOROOT/bin" + cd "$GOROOT/src" + hg update release.$_pkgver + + . ./make.bash +} + +package() { + cd "$srcdir/release-build" + + install -Dm644 LICENSE $pkgdir/usr/share/licenses/go/LICENSE + install -Dm644 misc/bash/go $pkgdir/etc/bash_completion.d/go + install -Dm644 misc/emacs/go-mode-load.el $pkgdir/usr/share/emacs/site-lisp/go-mode-load.el + install -Dm644 misc/emacs/go-mode.el $pkgdir/usr/share/emacs/site-lisp/go-mode.el + install -Dm644 misc/vim/syntax/go.vim $pkgdir/usr/share/vim/vimfiles/syntax/go.vim + + mkdir -p $pkgdir/{etc/profile.d,usr/{share/go,lib/go,lib/go/src}} + + cp -r bin $pkgdir/usr + cp -r doc misc -t $pkgdir/usr/share/go + cp -r pkg $pkgdir/usr/lib/go + + install -Dm644 src/Make.* $pkgdir/usr/lib/go/src + + # Headers for C modules + install -Dm644 src/pkg/runtime/runtime.h $pkgdir/usr/lib/go/src/pkg/runtime/runtime.h + install -Dm644 src/pkg/runtime/cgocall.h $pkgdir/usr/lib/go/src/pkg/runtime/cgocall.h + + install $srcdir/go.sh $pkgdir/etc/profile.d/ + + # Point Python scripts to the python2 binary + cd $pkgdir/usr/share/go/misc/dashboard + sed -i 's/python$/\02/' {buildcontrol,googlecode_upload}.py godashboard/app.yaml + sed -i 's/python"/python2"/' builder/main.go + sed -i 's/python /python2 /' builder.sh +} diff --git a/community/go/go.install b/community/go/go.install new file mode 100644 index 000000000..6d11cdbbc --- /dev/null +++ b/community/go/go.install @@ -0,0 +1,5 @@ +post_install() { + echo + echo "Source /etc/profile.d/go.sh or relogin" + echo +} diff --git a/community/go/go.sh b/community/go/go.sh new file mode 100755 index 000000000..4aa526a11 --- /dev/null +++ b/community/go/go.sh @@ -0,0 +1,3 @@ +export GOROOT=/usr/lib/go +export GOOS=linux +export GOBIN=/usr/bin |