diff options
author | Nogweii | 2024-04-28 16:42:01 -0700 |
---|---|---|
committer | Nogweii | 2024-04-28 16:42:01 -0700 |
commit | b4643c1ce207a6213d43322298d00bdc2d2b25ad (patch) | |
tree | a48aec46427d9e973c70fa67cc76a22bdcf757fc /PKGBUILD | |
download | aur-b4643c1ce207a6213d43322298d00bdc2d2b25ad.tar.gz |
Initial upload: formatjson5 0.2.6-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..16277691432d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Nogweii <packages@nogweii.net> +_libname=json5format +pkgname=formatjson5 +pkgver=0.2.6 +pkgrel=1 +pkgdesc="Format a JSON5 document with comments" +arch=(x86_64 arm64) +url="https://github.com/google/json5format" +license=('BSD') +makedepends=(cargo) +source=("$_libname-$pkgver.tar.gz::https://static.crates.io/crates/$_libname/$_libname-$pkgver.crate") +sha256sums=('b2894a72f82fa9f20e628bf4329cd0fb8e9fd5e87cc35944665a42b25bae9902') + +prepare() { + cd "$_libname-$pkgver" + + export RUSTUP_TOOLCHAIN=stable + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd "$_libname-$pkgver" + + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release --all-features --example $pkgname +} + +check() { + cd "$_libname-$pkgver" + + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features +} + +package() { + cd "$_libname-$pkgver" + + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/examples/$pkgname" +} |