author | Alexander Rødseth
<xyproto@archlinux.org> 2013-09-02 10:20:53 UTC |
committer | Alexander Rødseth
<xyproto@archlinux.org> 2013-09-02 10:20:53 UTC |
parent | 447922785f023392c0434f65a2d3346a0b7ce46d |
PKGBUILD | +14 | -10 |
diff --git a/PKGBUILD b/PKGBUILD index f64d921..6be938d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -7,11 +7,9 @@ # Contributor: Mike Rosset <mike.rosset@gmail.com> # Contributor: Daniel YC Lin <dlin.tw@gmail.com> -# TODO: Create split packages for the crosscompilation versions. Maybe. - pkgname=go pkgver=1.1.2 -pkgrel=1 +pkgrel=2 epoch=2 pkgdesc='Compiler and tools for the Go programming language from Google' arch=('x86_64' 'i686') @@ -23,23 +21,27 @@ options=('!strip') install="$pkgname.install" backup=('usr/lib/go/bin') -#if [ "$CARCH" == 'x86_64' ]; then -# source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-amd64.tar.gz" -# "$pkgname.sh") -# sha256sums=('ad583ff91bd2955fc48d24001785587e3c3b5ce5c09e4971a37028db4c3f6a98' -# '36202a833faeb8ea10760557a1e221025288480bdeebf776c8b610014aadc181') -#else +if [ "$CARCH" == 'x86_64' ]; then + source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-amd64.tar.gz" + "$pkgname.sh") + sha256sums=('ad583ff91bd2955fc48d24001785587e3c3b5ce5c09e4971a37028db4c3f6a98' + '36202a833faeb8ea10760557a1e221025288480bdeebf776c8b610014aadc181') +else source=("http://go.googlecode.com/files/${pkgname}$pkgver.linux-386.tar.gz" "$pkgname.sh") sha256sums=('56f384c973e58c098ec462bcd892a7c1166b9a392461970ddb22d57ed4d495af' '36202a833faeb8ea10760557a1e221025288480bdeebf776c8b610014aadc181') -#fi +fi build() { cd "$srcdir/$pkgname/src" export GOROOT_FINAL=/usr/lib/go + # We don't support SSE2 for i686, since many i686 CPUs don't have that. + # Build this package manually, build Go from AUR or use x86_64 instead. + export GO386=387 + # Enable ARM crosscompilation for linux export GOOS=linux export GOARCH=arm @@ -58,6 +60,8 @@ build() { check() { cd "$srcdir/$pkgname" + export GO386=387 + export GOOS=linux if [ "$CARCH" == 'x86_64' ]; then export GOARCH=amd64