blob: 7be2316b88b0e5acb491afcbd8ddc22678ed3ce0 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Joshua Wong <joshuawong AT anticentri DOT st>
# Contributor: Joshua Wong <joshuawong AT anticentri DOT st>
# Contributor: Vianney Bouchaud <aur dot vianney at bouchaud dot org>
pkgname=vcluster
pkgdesc='Create fully functional virtual Kubernetes clusters'
pkgver=0.19.2
pkgrel=1
arch=('x86_64' 'armv7l' 'armv7h' 'aarch64')
url="https://vcluster.com"
license=('apache')
makedepends=(
'go'
)
depends=(
'glibc'
)
_latest() {
curl -s https://api.github.com/repos/loft-sh/vcluster/releases | jq -r '. | map(select(.prerelease | not)) | .[0].tag_name'
}
source=(
"${pkgname}-${pkgver}.tar.gz::https://github.com/loft-sh/vcluster/archive/refs/tags/v${pkgver}.tar.gz"
)
prepare() {
cd "$pkgname-$pkgver"
mkdir -p build/
}
build() {
cd "$pkgname-$pkgver"
export GOPATH="$srcdir/gopath"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "\
-linkmode=external \
-buildid='' \
-extldflags=\"${LDFLAGS}\"" \
-o build/$pkgname ./cmd/vclusterctl/main.go
}
check() {
cd "$pkgname-$pkgver"
go test ./cmd/vclusterctl/...
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 build/"$pkgname" "$pkgdir/usr/bin/$pkgname"
build/"$pkgname" completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$pkgname"
build/"$pkgname" completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
}
sha256sums=(
c8aa2b662e35a317c0b15a8c4f3409116a7b958493f849d9b7b897598c0e59e1
)
|