diff options
author | Phillip Schichtel | 2024-01-06 17:27:08 +0100 |
---|---|---|
committer | Phillip Schichtel | 2024-01-06 17:27:08 +0100 |
commit | 77849c036d613b17a3e3d49efc1cc4f8adb690af (patch) | |
tree | 9cfc2940c210406de9e7922207fa9d37ef7d9814 | |
download | aur-77849c036d613b17a3e3d49efc1cc4f8adb690af.tar.gz |
init
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | PKGBUILD | 43 |
4 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5420960c62a4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = k0sctl + pkgdesc = A bootstrapping and management tool for k0s clusters. + pkgver = 0.17.1 + pkgrel = 1 + url = https://github.com/k0sproject/k0sctl + arch = x86_64 + arch = armv7h + arch = aarch64 + license = Apache + makedepends = go>=1.21 + provides = k0sctl + source = git+https://github.com/k0sproject/k0sctl.git#commit=56da107d9c904a98c85a62ef741e0def95be0277 + validpgpkeys = 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23 + sha256sums = SKIP + +pkgname = k0sctl diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..8500be219cfe --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +k0sctl +*.asc +*.tar.* +src/ +pkg/ diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..ff6f0043389f --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +.SRCINFO: PKGBUILD + makepkg --printsrcinfo > .SRCINFO + +package: PKGBUILD .SRCINFO + updpkgsums + makepkg --syncdeps --rmdeps --force --clean --noconfirm + +all: package + +clean: + rm -fRv .SRCINFO *.tar.* k0sctl/ src/ pkg/ *.asc 2> /dev/null || true diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..80fac4649310 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Phillip Schichtel <phillip@schich.tel> + +pkgname=k0sctl +pkgver=0.17.1 +pkgrel=1 +pkgdesc="A bootstrapping and management tool for k0s clusters." +arch=('x86_64' 'armv7h' 'aarch64') +url="https://github.com/k0sproject/k0sctl" +license=('Apache') +makedepends=('go>=1.21') +provides=(k0sctl) +validpgpkeys=(5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23 ) +source=("git+https://github.com/k0sproject/k0sctl.git#commit=56da107d9c904a98c85a62ef741e0def95be0277") +sha256sums=('SKIP') + +build() { + cd "k0sctl" + local git_tag="$(git rev-parse --short=7 HEAD)" + local definitions="-X 'github.com/k0sproject/k0sctl/version.Environment=production' -X 'github.com/carlmjohnson/versioninfo.Revision=${git_tag}' -X 'github.com/carlmjohnson/versioninfo.Version=${pkgver}-${pkgrel}'" + + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + + go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "${definitions} -linkmode external -extldflags \"${LDFLAGS}\"" \ + -o k0sctl \ + main.go +} + +package() { + local bin="$pkgdir/usr/bin/k0sctl" + install -D -m755 "$srcdir/k0sctl/k0sctl" "$bin" + "$bin" completion --shell bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/k0sctl" + "$bin" completion --shell zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_k0sctl" + "$bin" completion --shell fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/k0sctl.fish" +} + |