pkgname=cgit-syntect pkgver=0.2.0 pkgrel=1 pkgdesc="syntax highlighting for cgit based on syntect" arch=(x86_64 aarch64) url="https://git.mia.jetzt/cgit-syntect" license=(ISC) depends=(oniguruma) makedepends=(cargo oniguruma) options=(!lto) source=("https://git.mia.jetzt/cgit-syntect/snapshot/cgit-syntect-$pkgver.tar.gz") sha512sums=(SKIP) prepare() { export RUSTUP_TOOLCHAIN=stable cd $pkgname-$pkgver cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cd $pkgname-$pkgver cargo build --frozen --release --all-features } package() { install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname-$pkgver/target/release/$pkgname" }