# Maintainer: Ariadne Conill pkgname=ko pkgver=0.13.0 pkgrel=4 pkgdesc="Build containers from Go projects" url="https://ko.build/" arch="all" license="Apache-2.0" makedepends="go" subpackages=" $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/ko-build/ko/archive/v$pkgver/ko-$pkgver.tar.gz" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { go build -v -ldflags "-X github.com/google/ko/pkg/commands.Version=$pkgver" for i in bash fish zsh; do ./ko completion $i > ko.$i done } check() { go test ./... } package() { install -Dm755 ko -t "$pkgdir"/usr/bin/ install -Dm644 ko.bash "$pkgdir"/usr/share/bash-completion/completions/ko install -Dm644 ko.fish "$pkgdir"/usr/share/fish/vendor_completions.d/ko.fish install -Dm644 ko.zsh "$pkgdir"/usr/share/zsh/site-functions/_ko } sha512sums=" bb20fbdf8a8f14d76d6363b557711bdc3e4068c51bce702024af9090632d0d9ed32c6c4fd26181e68db9fbd783ed8e12dfd7de2b52eafcfee6999643feb76fc4 ko-0.13.0.tar.gz "