Initial version

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-06-12 14:19:53 +02:00
commit 94fd319c32
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
4 changed files with 66 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
vim-go-tools-*.pkg.tar.xz

23
PKGBUILD Normal file
View File

@ -0,0 +1,23 @@
# Maintainer: Knut Ahlers <knut at ahlers dot me>
pkgname=vim-go-tools
pkgver=0.1.0
pkgrel=1
pkgdesc="Package of tools required by vim-go"
arch=('x86_64')
url="https://github.com/fatih/vim-go"
license=(other)
makedepends=('go')
source=("build.sh")
sha512sums=('5055aec7ebd34916110b85bde9f7db1bce22a278e0c02e518581d399919aac2052e9e9d9469ce869e9152e418234f494729170e0fa261c308c4f29d8abd01ac1')
build() {
mkdir -p "${srcdir}/go"
GOPATH="${srcdir}/go" bash "${srcdir}/build.sh"
}
package() {
for binary in "${srcdir}/go/bin/"*; do
install -Dm755 "${srcdir}/go/bin/$(basename ${binary})" "${pkgdir}/usr/bin/$(basename ${binary})"
done
}

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# Luzifer / vim-go-tools
This repo contains an Archlinux PKGBUILD to compile and pack the tools required by [vim-go](https://github.com/fatih/vim-go).
## Usage
Build this repo using the following command and afterwards install the generated `.pkg.tar.xz` file:
```console
# docker run --rm -ti -v $(pwd):/src luzifer/arch-repo-builder https://gist.github.com/799bd9e5a06c3b8509d6da3a8f530b5c.git
```

31
build.sh Normal file
View File

@ -0,0 +1,31 @@
#!/bin/bash
set -euo pipefail
packages=(
github.com/alecthomas/gometalinter
github.com/davidrjenni/reftools/cmd/fillstruct
github.com/fatih/gomodifytags
github.com/fatih/motion
github.com/go-delve/delve/cmd/dlv
github.com/golangci/golangci-lint/cmd/golangci-lint
github.com/josharian/impl
github.com/jstemmer/gotags
github.com/kisielk/errcheck
github.com/klauspost/asmfmt/cmd/asmfmt
github.com/koron/iferr
github.com/mdempsky/gocode
github.com/rogpeppe/godef
github.com/stamblerre/gocode
github.com/zmb3/gogetdoc
golang.org/x/lint/golint
golang.org/x/tools/cmd/goimports
golang.org/x/tools/cmd/gopls
golang.org/x/tools/cmd/gorename
golang.org/x/tools/cmd/guru
honnef.co/go/tools/cmd/keyify
)
for package in "${packages[@]}"; do
echo -e "\e[96mBuilding ${package}...\e[m" >&2
go get -u -v "${package}"
done