# Maintainer: Yigit Sever pkgname=tex-fmt pkgver=0.4.5 pkgrel=1 pkgdesc="An extremely fast LaTeX formatter written in Rust" arch=('x86_64') url="https://github.com/WGUNDERWOOD/tex-fmt" license=('MIT') makedepends=(cargo) source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") sha256sums=('d3c173742645e3228d0cca9f18c7cc39c5dc8d3d0eb9c5cd3925f5cc80d12044') prepare() { cd "$srcdir/$pkgname-$pkgver" export RUSTUP_TOOLCHAIN=stable cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { cd "$srcdir/$pkgname-$pkgver" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cargo build --frozen --release --all-features } check() { cd "$srcdir/$pkgname-$pkgver" export RUSTUP_TOOLCHAIN=stable cargo test --frozen --all-features } package() { cd "$srcdir/$pkgname-$pkgver" install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }