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 --- .SRCINFO | 12 ++++++++++++ PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..51057dc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = tex-fmt + pkgdesc = An extremely fast LaTeX formatter written in Rust + pkgver = 0.3.1 + pkgrel = 1 + url = https://github.com/WGUNDERWOOD/tex-fmt + arch = x86_64 + license = MIT + makedepends = cargo + source = tex-fmt-0.3.1.tar.gz::https://github.com/WGUNDERWOOD/tex-fmt/archive/refs/tags/v0.3.1.tar.gz + sha256sums = deb0187747311ec1c4b6a6f6b40168ee494b9819d3fb37501de61479ba5d8a79 + +pkgname = tex-fmt 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