diff options
-rw-r--r-- | community/go/APKBUILD | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD index 35d9818ad9..eb3faaced5 100644 --- a/community/go/APKBUILD +++ b/community/go/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Eivind Uggedal <eivind@uggedal.com> pkgname=go -pkgver=1.7_rc1 +pkgver=1.7_rc2 # This should be the latest commit on the corresponding release branch _toolsver="527b253f588776e5f72a0a0d1e93195cd3f82707" pkgrel=0 @@ -25,25 +25,14 @@ source="http://golang.org/dl/go${pkgver/_/}.src.tar.gz _gotools="cover godoc stringer" _gocross="darwin freebsd openbsd windows" - -_builddir="$srcdir"/$pkgname _tooldir="$srcdir"/tools-${_toolsver} -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - +builddir="$srcdir"/$pkgname build() { - cd "$_builddir/src" + cd "$builddir/src" export GOPATH="$srcdir" - export GOROOT="$_builddir" + export GOROOT="$builddir" export GOBIN="$GOROOT"/bin export GOROOT_FINAL=/usr/lib/go export GOROOT_BOOTSTRAP=/usr/lib/go-bootstrap @@ -75,7 +64,7 @@ build() { } package() { - cd "$_builddir" + cd "$builddir" mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/lib/go/bin "$pkgdir"/usr/share/doc/go # go before 1.7 has issues with randmmap on arm @@ -93,7 +82,7 @@ package() { # The source needs to be installed due to an upstream # bug (https://github.com/golang/go/issues/2775). # When this is resolved we can split out the source to a - # go-doc sub package. + # go-src sub package. cp -a pkg src lib "$pkgdir"/usr/lib/go || return 1 cp -r doc misc "$pkgdir"/usr/share/doc/go || return 1 @@ -103,7 +92,7 @@ package() { -exec rm -rf \{\} \+ || return 1 find "$pkgdir"/usr/lib/go/src \( -type d -a -name "testdata" \) \ -exec rm -rf \{\} \+ || return 1 - find "$pkgdir"/usr/lib/go/src \( -type f -a -name "*.bash" \) \ + find "$pkgdir"/usr/lib/go/src -type f -a \( -name "*.bash" -o -name "*.rc" -o -name "*.bat" \) \ -exec rm -rf \{\} \+ || return 1 rm -rf "$pkgdir"/usr/lib/go/pkg/bootstrap @@ -115,7 +104,7 @@ tools() { depends="$pkgname" mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/go/bin - for binary in "$_builddir"/bin/*; do + for binary in "$builddir"/bin/*; do mv $binary "$subpkgdir"/usr/lib/go/bin || return 1 ln -s /usr/lib/go/bin/"${binary##*/}" "$subpkgdir"/usr/bin/ || return 1 done @@ -125,11 +114,11 @@ tools() { "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/godoc || return 1 for tool in $_gotools; do - if test -f "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool - then - mv "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool \ - "$subpkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool || return 1 - fi + [ -f "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool ] \ + || continue + + mv "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool \ + "$subpkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool || return 1 done } @@ -145,12 +134,13 @@ cross() { "$subpkgdir"/usr/lib/go/pkg || return 1 done } -md5sums="9235e0a992216ae400eb1a3bd350259f go1.7rc1.src.tar.gz -24099025de8422aa8b50341ea71bad0e go-tools-1.7rc1.tar.gz + +md5sums="c5cd29076e50111d299c2411ded5b427 go1.7rc2.src.tar.gz +24099025de8422aa8b50341ea71bad0e go-tools-1.7rc2.tar.gz 1e3ad4f657ac6c22a92e8fc907893e4f default-buildmode-pie.patch" -sha256sums="f26b42ea8d3de92efda5e2f7172b22d59e19676f23bbcf64412b32b4f4a5ff58 go1.7rc1.src.tar.gz -89819a5a457d1771bc5960079ed6f0e2870c81aafd3e0b13f0b82fc2427a1220 go-tools-1.7rc1.tar.gz +sha256sums="87bafefb093dd163d264099b39b1bcdc227f54f935b77f5ff74b0d57e3638da6 go1.7rc2.src.tar.gz +89819a5a457d1771bc5960079ed6f0e2870c81aafd3e0b13f0b82fc2427a1220 go-tools-1.7rc2.tar.gz f3e5a8e0c1c05c34f489ccbfb65291ab2265fa0ef04b8b501e5c98b17547c4b9 default-buildmode-pie.patch" -sha512sums="3c4fee4ebc8ac0e1eeb36b5583263b9c28952ecd93c6dfba6696dec820f41b4f1cb27b9d630d94d066df00c06e11a748542a06ddccbc66a7c9a80e8e2906dd8f go1.7rc1.src.tar.gz -c298f821033f9db3cd100e38346474c3982417958f347078abfff895834964251269116535e46aa5c2a9e58c421928b874ea98e5c5cd65a83c0b64ae04029d3e go-tools-1.7rc1.tar.gz +sha512sums="e16ac84c5f900e94dc53a535f228c91ca3d4d719d00656db52b2a856df8e8163c72c9b5dccab775858126faa5c6a72f665c4a9134ed889af495ddda2b617be58 go1.7rc2.src.tar.gz +c298f821033f9db3cd100e38346474c3982417958f347078abfff895834964251269116535e46aa5c2a9e58c421928b874ea98e5c5cd65a83c0b64ae04029d3e go-tools-1.7rc2.tar.gz 13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148 default-buildmode-pie.patch" |