mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 02:27:15 +08:00
go-tools: update to latest version
This commit is contained in:
parent
f6e78900a3
commit
1ee683ce83
@ -1,7 +1,7 @@
|
|||||||
# Arch Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
# Arch Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
||||||
|
|
||||||
pkgname=go-tools
|
pkgname=go-tools
|
||||||
pkgver=1.9+2247+5d2fd3cc
|
pkgver=1.11+2495+9e9bf16a
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Developer tools for the Go programming language'
|
pkgdesc='Developer tools for the Go programming language'
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
@ -9,50 +9,47 @@ url='http://golang.org/'
|
|||||||
license=(BSD)
|
license=(BSD)
|
||||||
depends=(glibc)
|
depends=(glibc)
|
||||||
makedepends=(git go)
|
makedepends=(git go)
|
||||||
_commit=5d2fd3ccab986d52112bf301d47a819783339d0e
|
_commit=9e9bf16a4efe175e2867e1661feefa6278e4e14e
|
||||||
_net_commit=ab5485076ff3407ad2d02db054635913f017b0ed
|
_net_commit=c39426892332e1bb5ec0a434a079bf82f5d30c54
|
||||||
source=(git+https://go.googlesource.com/tools#commit=$_commit
|
source=(git+https://go.googlesource.com/tools#commit=$_commit
|
||||||
git+https://github.com/golang/net#commit=$_net_commit)
|
git+https://github.com/golang/net#commit=$_net_commit)
|
||||||
md5sums=('SKIP'
|
md5sums=('SKIP'
|
||||||
'SKIP')
|
'SKIP')
|
||||||
|
|
||||||
_tools=(benchcmp callgraph cover digraph eg fiximports godex godoc goimports
|
_tools=(benchcmp callgraph compilebench cover digraph eg fiximports
|
||||||
gomvpkg gorename gotype goyacc guru heapview html2article present
|
go-contrib-init godex godoc goimports gomvpkg gorename gotype
|
||||||
ssadump stringer)
|
goyacc guru heapview html2article present ssadump stringer
|
||||||
|
tip toolstash)
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
local _gover=1.9
|
local _gover=1.11
|
||||||
cd tools
|
cd tools
|
||||||
printf "%s+%s+%s" $_gover "$(git rev-list --count HEAD)" \
|
printf "%s+%s+%s" $_gover "$(git rev-list --count HEAD)" \
|
||||||
"$(git rev-parse --short HEAD)"
|
"$(git rev-parse --short HEAD)"
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
mkdir -p gopath/src/golang.org/x build
|
mkdir -p gopath/src/golang.org/x
|
||||||
cp -r tools net gopath/src/golang.org/x/
|
cp -rf tools net gopath/src/golang.org/x/
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
export GOPATH="$srcdir/gopath"
|
export GOPATH="$srcdir/gopath"
|
||||||
|
cd gopath/src/golang.org/x/tools
|
||||||
cd build
|
go install -v -a -gcflags "all=-trimpath=${GOPATH}" -asmflags "all=-trimpath=${GOPATH}" ./cmd/...
|
||||||
for tool in ${_tools[@]}; do
|
|
||||||
go build -v -a golang.org/x/tools/cmd/$tool
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
export GOPATH="$srcdir/gopath"
|
export GOPATH="$srcdir/gopath"
|
||||||
|
cd gopath/src/golang.org/x/tools
|
||||||
for tool in ${_tools[@]}; do
|
go test ./cmd/...
|
||||||
go test golang.org/x/tools/cmd/$tool
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
for tool in ${_tools[@]}; do
|
for tool in ${_tools[@]}; do
|
||||||
install -Dm755 build/$tool "$pkgdir/usr/bin/$tool"
|
install -Dm755 gopath/bin/$tool "$pkgdir/usr/bin/$tool"
|
||||||
done
|
done
|
||||||
|
|
||||||
install -Dm644 tools/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 tools/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user