feat(package): Added PKGBUILD

This commit is contained in:
2026-04-05 07:26:25 +02:00
parent 2abee257e3
commit 417145188c
+30
View File
@@ -0,0 +1,30 @@
# Maintainer: Tim Huizinga <tim@huizinga.dev>
pkgname=crete
pkgver=0.0.0
pkgrel=1
pkgdesc='A tool that takes node and cluster configs and uses it to generate talos configs and render jinja templates'
url='https://git.huizinga.dev/infra/crete'
license=('GPL')
makedepends=('cargo-nightly')
depends=()
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=()
b2sums=()
prepare() {
export RUSTUP_TOOLCHAIN=nightly
cargo fetch --locked --target host-tuple
}
build() {
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
cargo run --bin $pkgname -- shell-completions > _$pkgname
}
package() {
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -Dm0755 -t "$pkgdir/usr/share/zsh/site-functions" "_$pkgname"
}