🗝
summary refs log tree commit diff
path: root/packages/cgit-syntect/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cgit-syntect/PKGBUILD')
-rw-r--r--packages/cgit-syntect/PKGBUILD29
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/cgit-syntect/PKGBUILD b/packages/cgit-syntect/PKGBUILD
new file mode 100644
index 0000000..d20277c
--- /dev/null
+++ b/packages/cgit-syntect/PKGBUILD
@@ -0,0 +1,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"
+}