feat(package): Added PKGBUILD
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
# Maintainer: Tim Huizinga <tim@huizinga.dev>
|
||||||
|
pkgname=crete
|
||||||
|
pkgver=dummy
|
||||||
|
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-3.0-or-later')
|
||||||
|
makedepends=('cargo-nightly')
|
||||||
|
depends=()
|
||||||
|
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
|
||||||
|
source=('LICENSE')
|
||||||
|
sha256sums=('4bffc7da729013886ae68623c0d6145201b20a495879b589990953b2a27e1fbd')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cargo info $pkgname | grep -Po '^version: \K[\d\.]+'
|
||||||
|
}
|
||||||
|
|
||||||
|
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 -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions" "_$pkgname"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user