diff options
author | root <root@rshg054.dnsready.net> | 2012-04-05 00:01:23 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-04-05 00:01:23 +0000 |
commit | 608a49084f8c6599f8adef56b6c1480c3e293c04 (patch) | |
tree | b385b78ccb9657030d632f662b68a495286e9a55 /community/go | |
parent | 96deddcec133f85220a15d4c435004c577395169 (diff) |
Thu Apr 5 00:01:22 UTC 2012
Diffstat (limited to 'community/go')
-rw-r--r-- | community/go/PKGBUILD | 7 | ||||
-rw-r--r-- | community/go/go | 3 | ||||
-rw-r--r-- | community/go/go.install | 32 |
3 files changed, 39 insertions, 3 deletions
diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD index ea5fafe3f..ba9ae1152 100644 --- a/community/go/PKGBUILD +++ b/community/go/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 68691 2012-03-31 19:33:32Z arodseth $ +# $Id: PKGBUILD 68856 2012-04-03 23:02:20Z arodseth $ # Maintainer: Vesa Kaihlavirta <vegai@iki.fi> # Maintainer: Alexander Rødseth <rodseth@gmail.com> # Contributor: Andres Perera <andres87p gmail> @@ -8,7 +8,7 @@ pkgname=go pkgver=1 -pkgrel=3 +pkgrel=4 epoch=2 pkgdesc='Google Go compiler and tools (release version)' arch=('x86_64' 'i686') @@ -17,9 +17,10 @@ license=('custom') depends=('perl' 'ed' 'gawk') makedepends=('mercurial' 'inetutils') options=('!strip' '!emptydirs') +install=go.install source=("$pkgname" "$pkgname.sh") -md5sums=('fb4d2508c44b3823e05ed360c2976322' +md5sums=('c14a33c0d138f9cd19264a8dd0b809a7' 'e7087d190fd519db3be5adb3a51194cc') build() { diff --git a/community/go/go b/community/go/go index c284ec45c..2f68ce8ff 100644 --- a/community/go/go +++ b/community/go/go @@ -2,4 +2,7 @@ if [[ -z $GOROOT ]]; then export GOROOT=/usr/lib/go fi +if [[ -z $GOROOT_FINAL ]]; then + export GOROOT_FINAL=$GOROOT +fi /usr/bin/go.elf "$@" diff --git a/community/go/go.install b/community/go/go.install new file mode 100644 index 000000000..9a87b9d11 --- /dev/null +++ b/community/go/go.install @@ -0,0 +1,32 @@ +post_upgrade() { + # Backup any previous /usr/lib/go/bin directory + if [ -e /usr/lib/go/bin ]; then + mv /usr/lib/go/bin /usr/lib/go/bin.pacnew + fi + + # Point /usr/lib/go/bin to /usr/bin + # + # 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 /usr/lib/go/bin +} + +post_install() { + post_upgrade +} + +pre_remove() { + if [ -c /usr/lib/go/bin ]; then + rmdir --ignore-fail-on-non-empty /usr/lib/go/bin + fi + if [ -L /usr/lib/go/bin ]; then + rm /usr/lib/go/bin + fi +} + +# vim:set ts=2 sw=2 et: |