diff options
Diffstat (limited to 'packages/cgit-syntect')
-rw-r--r-- | packages/cgit-syntect/.gitignore | 1 | ||||
-rw-r--r-- | packages/cgit-syntect/PKGBUILD | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/packages/cgit-syntect/.gitignore b/packages/cgit-syntect/.gitignore new file mode 100644 index 0000000..42b3b8e --- /dev/null +++ b/packages/cgit-syntect/.gitignore @@ -0,0 +1 @@ +/cgit-syntect-*.tar* 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" +} |