🗝
summary refs log tree commit diff
path: root/packages/cgit-syntect/PKGBUILD
blob: d20277c49d7cc53e154b5fe9f7f95be1c5dac397 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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"
}