blob: 16c2e0bef463ee19b4afdd184376b3d812ffe381 (
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
|
# 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.21.1
pkgrel=1
arch=('x86_64' 'armv7l' 'armv7h' 'aarch64')
url="https://vcluster.com"
license=('apache')
makedepends=(
'go'
)
depends=(
'glibc'
)
source=(
"${pkgname}-${pkgver}.tar.gz::https://github.com/loft-sh/vcluster/archive/refs/tags/v${pkgver}.tar.gz"
)
sha256sums=(
"fd7d955a8a77de17a64c20bce91f24bbbd8626d5d3e7b51daba60e5afa6f4612"
)
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"
}
|