diff options
author | Yigit Sever | 2024-08-31 11:01:25 +0200 |
---|---|---|
committer | Yigit Sever | 2024-08-31 11:01:25 +0200 |
commit | c7f53e0db960468be692ccd365051a22b2c4e30f (patch) | |
tree | f825d27feeecc75e32ccdb08749d98c306715143 /PKGBUILD | |
download | packages-c7f53e0db960468be692ccd365051a22b2c4e30f.tar.gz packages-c7f53e0db960468be692ccd365051a22b2c4e30f.tar.bz2 packages-c7f53e0db960468be692ccd365051a22b2c4e30f.zip |
Add to AUR
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..e7413df --- /dev/null +++ b/PKGBUILD | |||
@@ -0,0 +1,37 @@ | |||
1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | ||
2 | |||
3 | pkgname=tex-fmt | ||
4 | pkgver=0.3.1 | ||
5 | pkgrel=1 | ||
6 | pkgdesc="An extremely fast LaTeX formatter written in Rust" | ||
7 | arch=('x86_64') | ||
8 | url="https://github.com/WGUNDERWOOD/tex-fmt" | ||
9 | license=('MIT') | ||
10 | makedepends=(cargo) | ||
11 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") | ||
12 | sha256sums=('deb0187747311ec1c4b6a6f6b40168ee494b9819d3fb37501de61479ba5d8a79') | ||
13 | |||
14 | prepare() { | ||
15 | cd "$srcdir/$pkgname-$pkgver" | ||
16 | export RUSTUP_TOOLCHAIN=stable | ||
17 | cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" | ||
18 | } | ||
19 | |||
20 | build() { | ||
21 | cd "$srcdir/$pkgname-$pkgver" | ||
22 | export RUSTUP_TOOLCHAIN=stable | ||
23 | export CARGO_TARGET_DIR=target | ||
24 | cargo build --frozen --release --all-features | ||
25 | } | ||
26 | |||
27 | check() { | ||
28 | cd "$srcdir/$pkgname-$pkgver" | ||
29 | export RUSTUP_TOOLCHAIN=stable | ||
30 | cargo test --frozen --all-features | ||
31 | } | ||
32 | |||
33 | package() { | ||
34 | cd "$srcdir/$pkgname-$pkgver" | ||
35 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" | ||
36 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||
37 | } | ||