From 94fd319c32e526b1ee2c8607d0c29915e5baa446 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 12 Jun 2019 14:19:53 +0200 Subject: [PATCH] Initial version Signed-off-by: Knut Ahlers --- .gitignore | 1 + PKGBUILD | 23 +++++++++++++++++++++++ README.md | 11 +++++++++++ build.sh | 31 +++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 README.md create mode 100644 build.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..447179c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vim-go-tools-*.pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..917b5e9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Knut Ahlers + +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 +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..0438db1 --- /dev/null +++ b/README.md @@ -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 +``` diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..49be82f --- /dev/null +++ b/build.sh @@ -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