diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..3ef8136 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Firstname Lastname +pkgname=crete +pkgver=0.1.0 +pkgrel=1 +pkgdesc='' +url='https://git.huizinga.dev/infra/crete' +license=() +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 -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" + install -Dm0755 -t "$pkgdir/usr/share/zsh/site-functions" "_$pkgname" +}