diff options
author | Vianney Bouchaud | 2023-10-06 11:07:53 +0200 |
---|---|---|
committer | Vianney Bouchaud | 2023-10-06 11:07:53 +0200 |
commit | fc0066cb52fd05c2f07af4f35008d91917ea0016 (patch) | |
tree | d1e66897c23021cf3a537f5ce358656f892483ae | |
download | aur-fc0066cb52fd05c2f07af4f35008d91917ea0016.tar.gz |
Initial upload: vcluster-git 0.16.1.r4.ga45458f2-1
adding vcluster-git package
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 70 |
3 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a951fe195b07 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = vcluster-git + pkgdesc = Create fully functional virtual Kubernetes clusters + pkgver = 0.16.1.r4.ga45458f2 + pkgrel = 1 + url = https://vcluster.com + arch = x86_64 + arch = armv7l + arch = armv7h + arch = aarch64 + license = apache + makedepends = go + makedepends = git + depends = glibc + source = vcluster::git+https://github.com/loft-sh/vcluster#branch=main + sha256sums = SKIP + +pkgname = vcluster-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..61efb94a28da --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/vcluster diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2e2d8f6978dc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# 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-git +_pkgname=vcluster +pkgdesc='Create fully functional virtual Kubernetes clusters' +pkgver=0.16.1.r4.ga45458f2 +pkgrel=1 +arch=('x86_64' 'armv7l' 'armv7h' 'aarch64') +url="https://vcluster.com" +license=('apache') +makedepends=( + 'go' + 'git' +) +depends=( + 'glibc' +) + +pkgver() { + cd "$srcdir/$_pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +source=( + "$_pkgname::git+https://github.com/loft-sh/vcluster#branch=main" +) + +sha256sums=( + 'SKIP' +) + +prepare() { + cd "$srcdir/$_pkgname" + mkdir -p build/ +} + +build() { + cd "$srcdir/$_pkgname" + 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 "$srcdir/$_pkgname" + go test ./cmd/vclusterctl/... +} + +package() { + cd "$srcdir/$_pkgname" + + 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" +} |