diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD
index 2f2653f2c..81454534b 100644
--- a/community/go/PKGBUILD
+++ b/community/go/PKGBUILD
@@ -16,8 +16,8 @@
 
 pkgname=go
 epoch=2
-pkgver=1.2.1
-pkgrel=5
+pkgver=1.2.2
+pkgrel=1
 pkgdesc='Compiler and tools for the Go programming language from Google'
 url='http://golang.org/'
 license=('custom')
@@ -29,7 +29,7 @@ optdepends=('mercurial: for fetching sources from mercurial repositories'
             'bzr: for fetching sources from bazaar repositories'
             'subversion: for fetching sources from subversion repositories')
 install="$pkgname.install"
-source=("$pkgname-$pkgver::hg+https://code.google.com/p/$pkgname#branch=release-branch.$pkgname${pkgver/.1}")
+source=("$pkgname-$pkgver::hg+https://code.google.com/p/$pkgname#tag=$pkgname$pkgver")
 md5sums=('SKIP')
 
 build() {
@@ -44,6 +44,7 @@ build() {
   export GOOS=linux
   export GOPATH="$srcdir/"
   export GOROOT="$srcdir/$pkgname-$pkgver"
+  export GOBIN="$GOROOT/bin"
 
   bash make.bash
 
@@ -64,6 +65,7 @@ check() {
 
   export GOARCH=arm
   export GOROOT="$srcdir/$pkgname-$pkgver"
+  export GOBIN="$GOROOT/bin"
   export PATH="$srcdir/$pkgname-$pkgver/bin:$PATH"
 
   # TestSimpleMulticastListener will fail in standard chroot
@@ -74,8 +76,9 @@ package() {
   cd "$pkgname-$pkgver"
 
   export GOROOT="$srcdir/$pkgname-$pkgver"
+  export GOBIN="$GOROOT/bin"
 
-  install -Dm755 ../godoc "$pkgdir/usr/bin/godoc"
+  install -Dm755 "$srcdir/godoc" "$pkgdir/usr/bin/godoc"
 
   install -Dm644 LICENSE \
     "$pkgdir/usr/share/licenses/go/LICENSE"