X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id EA608DC010E for ; Wed, 30 Sep 2015 15:33:25 +0000 (UTC) Received: from lithium.8pit.net (lithium.8pit.net [141.101.32.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 67246DC00F4 for ; Wed, 30 Sep 2015 15:33:24 +0000 (UTC) Received: from localhost (ip5f5ac8fc.dynamic.kabel-deutschland.de [95.90.200.252]); by lithium.8pit.net (OpenSMTPD) with ESMTPSA id d5ce2cba; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; for ; Wed, 30 Sep 2015 17:33:22 +0200 (CEST) Date: Wed, 30 Sep 2015 17:33:18 +0200 From: =?iso-8859-1?Q?S=F6ren?= Tempel To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] community/go: install all tools in $PATH Message-ID: <20150930153318.GA15987@francium.lan> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.24 (2015-08-30) X-Virus-Scanned: ClamAV using ClamSMTP --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This patch makes all community/go{,-tools} binaries available in $PATH. S=F6ren. --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-community-go-install-all-tools-in-PATH.patch" >From 8d410e7733986826cd6652f2c9d8f018ba52e03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Wed, 30 Sep 2015 17:26:49 +0200 Subject: [PATCH] community/go: install all tools in $PATH Previously you could only access them using `go tool ` however, some software expects to find vet, godoc, et cetera in your $PATH. Regarding godoc we manually make it accessible via `go tool ` as well, which isn't the default and might be dropped in the future. --- community/go/APKBUILD | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/community/go/APKBUILD b/community/go/APKBUILD index ca7451f..59d3680 100644 --- a/community/go/APKBUILD +++ b/community/go/APKBUILD @@ -4,7 +4,7 @@ pkgname=go pkgver=1.5.1 # This should be the latest commit on the corresponding release branch _toolsver="d02228d1857b9f49cd0252788516ff5584266eb6" -pkgrel=2 +pkgrel=3 pkgdesc="Go programming language compiler" url="http://www.golang.org/" arch="all" @@ -76,11 +76,11 @@ build() { package() { cd "$_builddir" - mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/lib/go "$pkgdir"/usr/share/doc/go + mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/lib/go/bin "$pkgdir"/usr/share/doc/go for binary in go gofmt; do - install -Dm755 bin/$binary "$pkgdir"/usr/lib/go/bin/$binary || return 1 - ln -s /usr/lib/go/bin/$binary "$pkgdir"/usr/bin/$binary || return 1 + mv bin/"$binary" "$pkgdir"/usr/lib/go/bin/ || return 1 + ln -s /usr/lib/go/bin/"$binary" "$pkgdir"/usr/bin/ || return 1 done # The source needs to be installed due to an upstream @@ -107,9 +107,15 @@ tools() { pkgdesc="Go programming language tools" depends="$pkgname" - install -dm755 "$subpkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH - install -Dm755 "$_builddir"/bin/godoc \ - "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool + mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/go/bin + 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 + + mkdir -p "$subpkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH + cp "$subpkgdir"/usr/lib/go/bin/godoc \ + "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/godoc || return 1 for tool in $_gotools; do mv "$pkgdir"/usr/lib/go/pkg/tool/linux_$GOARCH/$tool \ -- 2.6.0 --TB36FDmn/VVEgNH/-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---