author | Alexander Rødseth
<xyproto@archlinux.org> 2012-06-13 22:11:00 UTC |
committer | Alexander Rødseth
<xyproto@archlinux.org> 2012-06-13 22:11:00 UTC |
parent | 89453a20c201d639163d036da8f2c4d6a0ecee35 |
PKGBUILD | +16 | -3 |
go.install | +0 | -25 |
diff --git a/PKGBUILD b/PKGBUILD index e443433..6500266 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,7 +9,7 @@ pkgname=go pkgver=1.0.1 -pkgrel=5 +pkgrel=6 epoch=2 pkgdesc='Google Go compiler and tools (release version)' arch=('x86_64' 'i686') @@ -19,10 +19,11 @@ depends=('perl' 'gawk') makedepends=('inetutils') options=('!strip' '!emptydirs') install=go.install +backup=('usr/lib/go/bin') source=("http://go.googlecode.com/files/${pkgname}$pkgver.src.tar.gz" "$pkgname.sh") -sha1sums=('fc8a6d6725f7f2bf7c94685c5fd0880c9b7f67f6' - '0e8c7edc9d788be3518367bf04bdb5ff8b6bbdcf') +sha256sums=('29cdba7bc909df7091d81f52049de023502b5b3351cd206094f2c2d9961c0315' + 'a03db71d323ed2794123bb31b5c8ad5febd551c490b5c0b341052c8e5f0ba892') build() { cd "$srcdir/$pkgname" @@ -90,6 +91,18 @@ package() { # For packages that source /etc/profile.d/go.sh install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/etc/profile.d/$pkgname.sh" + # 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 "$pkgdir/usr/lib/go/bin" + + # For godoc + install -Dm644 favicon.ico "$pkgdir/usr/lib/go/favicon.ico" + rm -f "$pkgdir/usr/share/go/doc/articles/wiki/get.bin" } diff --git a/go.install b/go.install index 25b9690..755f0a4 100644 --- a/go.install +++ b/go.install @@ -1,20 +1,4 @@ post_upgrade() { - # Backup any previous /usr/lib/go/bin directory - if [ -d /usr/lib/go/bin -a ! -L /usr/lib/go/bin ]; then - mv /usr/lib/go/bin /usr/lib/go/bin.pacnew - fi - - # Point /usr/lib/go/bin to /usr/bin instead - # - # 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 - # Friendly message to the user echo "Example use of the \"go\" tool as a user:" echo " mkdir ~/go" @@ -26,13 +10,4 @@ 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: