summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8224e2b82d554e923a0e16a078918f1cf87d6066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Maintainer: Arturo Penen <apenen@gmail.com>

pkgname=rancher-k3d
pkgver=5.4.2
pkgrel=1
pkgdesc='k3s is the lightweight Kubernetes distribution by Rancher'
arch=('x86_64')
url='https://github.com/k3d-io/k3d'
license=('MIT')
source=("$pkgname-$pkgver.tar.gz::https://github.com/k3d-io/k3d/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('fae4ffc61987321b58b562d7d6c6c0e60c148eb47a9dfeddb330937ef06b3523')
makedepends=('go')

build() {
  cd $pkgname-$pkgver
  export VERSION=$pkgver
  make build
}

package() {
  install -Dm 755 "${srcdir}/$pkgname-$pkgver/bin/k3d" "${pkgdir}/usr/bin/k3d"

  # Populate bash and zsh completions
  install -dm 755 "${pkgdir}/usr/share/bash-completion/completions"
  install -dm 755 "${pkgdir}/usr/share/zsh/site-functions"
  "${pkgdir}/usr/bin/k3d" completion bash > "${pkgdir}/usr/share/bash-completion/completions/k3d"
  "${pkgdir}/usr/bin/k3d" completion zsh >  "${pkgdir}/usr/share/zsh/site-functions/_k3d"
}