summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 34 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9d747884f8a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: ml <ml@visu.li>
+pkgname=kind
+pkgver=0.7.0
+pkgrel=1
+pkgdesc='Kubernetes IN Docker - local clusters for testing Kubernetes'
+arch=('x86_64' 'aarch64' 'arm' 'armv6h' 'armv7h')
+url='https://kind.sigs.k8s.io/'
+license=('Apache')
+depends=('docker' 'glibc')
+makedepends=('go' 'gzip')
+optdepends=('kubectl: for managing Kubernetes clusters')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kubernetes-sigs/kind/archive/v${pkgver}.tar.gz")
+sha256sums=('d2d4f98596b68c449be95a31e9680fbf7ff3503a28a0943f1997eba50de208f9')
+
+build() {
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS='-buildmode=pie -trimpath -modcacherw'
+ local commit="$(zcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id)"
+ cd "${pkgname}-${pkgver}"
+ # version.GitCommit is ignored for tagged releases, keeping it just in case this changes
+ go build -o "$pkgname" -ldflags "-X sigs.k8s.io/kind/pkg/cmd/kind/version.GitCommit=${commit}"
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ go test ./...
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 "$pkgname" "${pkgdir}/usr/bin/${pkgname}"
+ ./"$pkgname" completion bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
+ ./"$pkgname" completion zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
+}