1 # Maintainer Christian Rebischke <chris.rebischke@archlinux.org>
2 # Maintainer: Fredy GarcĂa <frealgagu at gmail dot com>
3 # Maintainer: Maxim Baz <${pkgname} at maximbaz dot com>
4 # Contributor: Stefan Cocora <stefan dot cocora at gmail dot com>
9 pkgdesc="A command line tool that facilitates continuous development for Kubernetes applications"
11 url="https://github.com/GoogleContainerTools/${pkgname}"
13 depends=("docker" "kompose")
14 makedepends=("go" "go-licenses")
16 "minikube: To use Minikube"
17 "kubectl: For Kubernetes support"
18 "bash-completion: Tab autocompletion"
21 "${pkgname}-${pkgver}.tar.gz::https://github.com/GoogleContainerTools/${pkgname}/archive/v${pkgver}.tar.gz"
23 sha256sums=('58ca783891cb1dfe4a1c06027d637a3e699d1fd675b2235cdc8904400cc7744d')
24 b2sums=('b83904e78ac5b08b5c847b41e8e1866e8fc351e70ef1a7582a360de3a1e3f4ab48edc92413d47239de04e868c7a5095247aaf09ddf98291ae89868aa80a09cc8')
25 _commit="7ed1d722b53b55ac1c909f00d00a05b47d0964dd"
28 cd "${srcdir}/${pkgname}-${pkgver}"
30 rm -rf "${srcdir}/gopath"
31 mkdir -p "${srcdir}/gopath/bin"
32 mkdir -p "${srcdir}/gopath/src/github.com/GoogleContainerTools"
33 ln -rTsf "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/gopath/src/github.com/GoogleContainerTools/${pkgname}"
37 cd "${srcdir}/gopath/src/github.com/GoogleContainerTools/${pkgname}"
38 export GOPATH="${srcdir}/gopath"
39 export PATH="${PATH}:${GOPATH}/bin"
40 export VERSION="v${pkgver}"
41 export COMMIT="${_commit}"
42 export TREE_STATE="clean"
43 export CGO_CPPFLAGS="${CPPFLAGS}"
44 export CGO_CFLAGS="${CFLAGS}"
45 export CGO_CXXFLAGS="${CXXFLAGS}"
46 export CGO_LDFLAGS="${LDFLAGS}"
47 export GOFLAGS="-buildmode=pie -mod=readonly -modcacherw -x -v -ldflags=-linkmode=external"
50 # To avoid issues deleting directories next time
53 # Create completion files
54 "${srcdir}/gopath/bin/${pkgname}" completion bash > "${srcdir}/${pkgname}-completion.bash"
55 "${srcdir}/gopath/bin/${pkgname}" completion zsh > "${srcdir}/${pkgname}-completion.zsh"
59 install -Dm755 "${srcdir}/gopath/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
60 install -Dm644 "${srcdir}/${pkgname}-completion.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
61 install -Dm644 "${srcdir}/${pkgname}-completion.zsh" "${pkgdir}/usr/share/zsh/site-functions/_skaffold"