[arch-commits] Commit in go/trunk (PKGBUILD)

Alexander Rødseth arodseth at nymeria.archlinux.org
Mon Feb 24 21:03:13 UTC 2014


    Date: Monday, February 24, 2014 @ 22:03:12
  Author: arodseth
Revision: 106180

Building from the mercurial repo sources instead

+ Re-adding GOROOT (FS#38597)

Modified:
  go/trunk/PKGBUILD

----------+
 PKGBUILD |   40 ++++++++++++++++------------------------
 1 file changed, 16 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-02-24 19:17:26 UTC (rev 106179)
+++ PKGBUILD	2014-02-24 21:03:12 UTC (rev 106180)
@@ -10,7 +10,7 @@
 
 pkgname=go
 pkgver=1.2
-pkgrel=3
+pkgrel=4
 epoch=2
 pkgdesc='Compiler and tools for the Go programming language from Google'
 arch=('x86_64' 'i686')
@@ -17,29 +17,19 @@
 url='http://golang.org/'
 license=('custom')
 depends=('perl' 'gawk')
-makedepends=('inetutils')
+makedepends=('inetutils' 'mercurial')
 options=('!strip' 'staticlibs')
 optdepends=('liteide: IDE for editing and building projects written in Go'
-            'mercurial: Version control system written in Python'
-            'git: Version control system written in C'
-            'go-tools: Go vet and other tools')
+            'mercurial: VCS written in Python'
+            'git: VCS written in C')
 install="$pkgname.install"
-backup=('usr/lib/go/bin')
+source=("$pkgname-$pkgver::hg+https://code.google.com/p/$pkgname#branch=release-branch.$pkgname$pkgver"
+        "$pkgname.sh")
+md5sums=('SKIP'
+         'e7087d190fd519db3be5adb3a51194cc')
 
-if [ "$CARCH" == 'x86_64' ]; then
-  source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-amd64.tar.gz"
-          'go.sh')
-  sha256sums=('1252ca0aa0a96d53c0592fbc4ea9c9ff5c6b588169c92e08d06da9d89d9d91f2'
-              'b6209904c88bde96efcac846c267e308e4dc39c8a45f2690204c2175de4b9b0a')
-else
-  source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-386.tar.gz"
-          'go.sh')
-  sha256sums=('3f51aacc7af60c520fe1071f3cb1d9ceee5db0e8fdfb7168a73e12fd7603e651'
-              'b6209904c88bde96efcac846c267e308e4dc39c8a45f2690204c2175de4b9b0a')
-fi
-
 build() {
-  cd "$pkgname/src"
+  cd "$pkgname-$pkgver/src"
 
   export GOROOT_FINAL=/usr/lib/go
 
@@ -67,7 +57,7 @@
 }
 
 check() {
-  cd "$pkgname"
+  cd "$pkgname-$pkgver"
 
   export GO386=387
 
@@ -78,8 +68,8 @@
     export GOARCH=386
   fi
 
-  export GOROOT="$srcdir/$pkgname"
-  export PATH="$srcdir/$pkgname/bin:$PATH"
+  export GOROOT="$srcdir/$pkgname-$pkgver"
+  export PATH="$srcdir/$pkgname-$pkgver/bin:$PATH"
 
   # TestSimpleMulticastListener will fail in standard chroot
   cd src && bash run.bash --no-rebuild || true
@@ -86,7 +76,7 @@
 }
 
 package() {
-  cd "$pkgname"
+  cd "$pkgname-$pkgver"
 
   install -Dm644 LICENSE \
     "$pkgdir/usr/share/licenses/go/LICENSE"
@@ -136,7 +126,9 @@
   install -Dm644 src/pkg/runtime/cgocall.h \
     "$pkgdir/usr/lib/go/src/pkg/runtime/cgocall.h"
 
-  # Set GOROOT in order to make godoc work, see FS#38597
+  # Set GOROOT since /usr/lib/go is not a standard location,
+  # (http://golang.org/doc/install/source) and may also make godoc work
+  # for some instances where it otherwise does not work. (FS#38597)
   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




More information about the arch-commits mailing list