From c7f53e0db960468be692ccd365051a22b2c4e30f Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 31 Aug 2024 11:01:25 +0200 Subject: Add to AUR --- PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 PKGBUILD (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..e7413df --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Yigit Sever + +pkgname=tex-fmt +pkgver=0.3.1 +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=('deb0187747311ec1c4b6a6f6b40168ee494b9819d3fb37501de61479ba5d8a79') + +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" +} -- cgit v1.2.3-70-g09d2