diff options
author | Tony Lambiris | 2018-10-29 06:11:37 -0400 |
---|---|---|
committer | Tony Lambiris | 2018-10-29 06:11:37 -0400 |
commit | 37cd14758fe536331f0a47bf0a3b67ebe316c6fb (patch) | |
tree | 4f0804fa4dbb01a5dd956fa4c92b1e27654931c5 /PKGBUILD | |
download | aur-37cd14758fe536331f0a47bf0a3b67ebe316c6fb.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c490744477b5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Tony Lambiris <tony@criticalstack.com> + +pkgname=dive-git +pkgver=v0.0.8.r2.ge7a05d4 +_pkgname=dive +pkgrel=1 +pkgdesc="A tool for exploring each layer in a docker image" +url="https://github.com/pocke/dive" +arch=('x86_64' 'i686') +license=('MIT') +makedepends=('go') +source=("${_pkgname}::git+https://github.com/wagoodman/dive.git") +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_pkgname}" + + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}" + + GOROOT="/usr/lib/go" GOPATH="${srcdir}/go" PATH="$PATH:$GOPATH/bin" \ + go get -v -u github.com/wagoodman/dive +} + +build() { + cd "${srcdir}/go/src/github.com/wagoodman/dive" + + GOROOT="/usr/lib/go" GOPATH="${srcdir}/go" PATH="$PATH:$GOPATH/bin" \ + go build github.com/wagoodman/dive +} + +package() { + cd "${srcdir}/go/src/github.com/wagoodman/dive" + + install -Dm755 "dive" "${pkgdir}/usr/bin/dive" +} |