summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJean-Francois Chevrette2019-09-06 15:54:15 -0400
committerJean-Francois Chevrette2019-09-06 15:54:15 -0400
commite5137dd42502eb4688e62af9813bfcf1ae8c3ce3 (patch)
treee22193d402b57271b7c657b4bf873f626f3e040a /PKGBUILD
downloadaur-e5137dd42502eb4688e62af9813bfcf1ae8c3ce3.tar.gz
initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3ae8e8652dd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Jean-Francois Chevrette <jfchevrette@gmail.com>
+
+_pkgname=kapp
+pkgname=${_pkgname}-git
+pkgver=r193.b0d6b82
+pkgrel=1
+pkgdesc='kapp is a simple deployment tool focused on the concept of "Kubernetes application"'
+url="https://get-kapp.io/"
+license=('Apache')
+arch=('x86_64')
+makedepends=('go-pie' 'ytt>=0.17.0')
+source=("git+https://github.com/k14s/${_pkgname}/")
+sha256sums=('SKIP')
+provides=("kapp")
+
+pkgver() {
+ cd "${srcdir}/src/github.com/k14s/${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ rm -rf "${srcdir}/src/github.com/k14s/${_pkgname}"
+ mkdir -p "${srcdir}/src/github.com/k14s/${_pkgname}"
+ mv -T "${srcdir}/${_pkgname}" "${srcdir}/src/github.com/k14s/${_pkgname}"
+}
+
+build() {
+ cd "${srcdir}/src/github.com/k14s/${_pkgname}"
+
+ export GOPATH="${srcdir}"
+
+ mkdir -p tmp
+ build_values_path="../../../${BUILD_VALUES:-./hack/build-values-default.yml}"
+ (
+ cd pkg/kapp/website
+ ytt template \
+ -f . \
+ -f $build_values_path \
+ --file-mark 'generated.go.txt:exclusive-for-output=true' \
+ --output-directory ../../../tmp/
+ )
+ mv tmp/generated.go.txt pkg/kapp/website/generated.go
+
+ go build -o kapp ./cmd/kapp/...
+}
+
+package() {
+ cd "${srcdir}/src/github.com/k14s/${_pkgname}"
+ install -Dm755 "${_pkgname}" "${pkgdir}"/usr/bin/${_pkgname}
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${_pkgname}/LICENSE
+}