diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2016-10-06 18:44:48 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2016-10-06 18:45:30 +0200 |
commit | da2574c7e38aad2aa3980d54f6e11bf489007e35 (patch) | |
tree | 39dc7639eff8c7ec4081226981077b29d1597ac5 /community | |
parent | 39b5dcd3cc24d439e1fbd9a2e169abbc375ce9ea (diff) | |
download | aports-da2574c7e38aad2aa3980d54f6e11bf489007e35.tar.bz2 aports-da2574c7e38aad2aa3980d54f6e11bf489007e35.tar.xz |
community/go: split go-cross into multiple subpackages
Diffstat (limited to 'community')
-rw-r--r-- | community/go/APKBUILD | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD index 134c0a151b..990e669823 100644 --- a/community/go/APKBUILD +++ b/community/go/APKBUILD @@ -4,7 +4,7 @@ pkgname=go pkgver=1.7.1 # This should be the latest commit on the corresponding release branch _toolsver="26c35b4dcf6dfcb924e26828ed9f4d028c5ce05a" -pkgrel=0 +pkgrel=1 pkgdesc="Go programming language compiler" url="http://www.golang.org/" arch="all" @@ -14,7 +14,7 @@ depends_dev="" makedepends="bash" options="!strip" install="" -subpackages="$pkgname-doc $pkgname-tools $pkgname-cross" +subpackages="$pkgname-doc $pkgname-tools" source="http://golang.org/dl/go${pkgver/_/}.src.tar.gz $pkgname-tools-${pkgver/_/}.tar.gz::https://github.com/golang/tools/archive/${_toolsver}.tar.gz default-buildmode-pie.patch @@ -36,9 +36,13 @@ aarch64) esac _gotools="cover godoc stringer" -_gocross="darwin freebsd openbsd windows" _tooldir="$srcdir"/tools-${_toolsver} +_gocross="darwin freebsd openbsd windows" +for os in $_gocross; do + subpackages="$subpackages $pkgname-cross-${os}:_crosspkg" +done + builddir="$srcdir"/$pkgname build() { cd "$builddir/src" @@ -129,17 +133,16 @@ tools() { done } -cross() { - pkgdesk="Go cross compilers" +_crosspkg() { + local name="$(echo "${subpkgname}" | cut -d '-' -f3)" + pkgdesc="Go cross compiler for $name" depends="$pkgname" - mkdir -p "$subpkgdir"/usr/lib/go/pkg/tool - for os in $_gocross; do - mv "$pkgdir"/usr/lib/go/pkg/tool/${os}_* \ - "$subpkgdir"/usr/lib/go/pkg/tool || return 1 - mv "$pkgdir"/usr/lib/go/pkg/${os}_* \ - "$subpkgdir"/usr/lib/go/pkg || return 1 - done + mkdir -p "$subpkgdir"/usr/lib/go/pkg/tool/ + mv "$pkgdir"/usr/lib/go/pkg/tool/${name}_* \ + "$subpkgdir"/usr/lib/go/pkg/tool/ || return 1 + mv "$pkgdir"/usr/lib/go/pkg/${name}_* \ + "$subpkgdir"/usr/lib/go/pkg/ || return 1 } md5sums="433e2158e5c28fe24b11622df393cc46 go1.7.1.src.tar.gz |