# Maintainer Christian Rebischke # Maintainer: Fredy GarcĂ­a # Maintainer: Maxim Baz <${reponame} at maximbaz dot com> # Contributor: Stefan Cocora # Maintainer: Jerry Y. Chen pkgname=skaffold-git reponame=skaffold provides=('skaffold') conflicts=('skaffold') pkgver=2.11.0 pkgrel=1 pkgdesc="A command line tool that facilitates continuous development for Kubernetes applications" arch=("x86_64") url="https://github.com/GoogleContainerTools/${reponame}" license=("Apache") makedepends=("go") optdepends=( "docker: One of tools for building images support by skaffold" "minikube: To use Minikube" "kubectl: One of tools for deploying applications support by skaffold" "bash-completion: Tab autocompletion" ) source=( "${reponame}-${pkgver}.tar.gz::https://github.com/GoogleContainerTools/${reponame}/archive/v${pkgver}.tar.gz" ) sha256sums=('3c9b21cef0247edabed26b6e329476bae893b56756bf3eb483d09873ee45889a') b2sums=('0607dc57faa28845a908362a59b5e3c0b07099df48a170afe1feb7af47e7a83843da11715f8c16756d8131582951b1528c148a4d6380f082f783d2d679a91ded') _commit="5431c6bcbcca066347c0de2dfafca9ff143cd88b" prepare() { cd "${srcdir}/${reponame}-${pkgver}" rm -rf "${srcdir}/gopath" mkdir -p "${srcdir}/gopath/bin" mkdir -p "${srcdir}/gopath/src/github.com/GoogleContainerTools" ln -rTsf "${srcdir}/${reponame}-${pkgver}" "${srcdir}/gopath/src/github.com/GoogleContainerTools/${reponame}" } build() { cd "${srcdir}/gopath/src/github.com/GoogleContainerTools/${reponame}" export GOPATH="${srcdir}/gopath" export PATH="${PATH}:${GOPATH}/bin" export VERSION="v${pkgver}" export COMMIT="${_commit}" export TREE_STATE="clean" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -mod=readonly -modcacherw -x -v -ldflags=-linkmode=external" go install github.com/google/go-licenses@latest make install # To avoid issues deleting directories next time go clean --modcache # Create completion files "${srcdir}/gopath/bin/${reponame}" completion bash > "${srcdir}/${reponame}-completion.bash" "${srcdir}/gopath/bin/${reponame}" completion zsh > "${srcdir}/${reponame}-completion.zsh" } package() { install -Dm755 "${srcdir}/gopath/bin/${reponame}" "${pkgdir}/usr/bin/${reponame}" install -Dm644 "${srcdir}/${reponame}-completion.bash" "${pkgdir}/usr/share/bash-completion/completions/${reponame}" install -Dm644 "${srcdir}/${reponame}-completion.zsh" "${pkgdir}/usr/share/zsh/site-functions/_skaffold" }