# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=xh pkgver=0.18.0 pkgrel=2 pkgdesc="Yet another HTTPie clone" url="https://github.com/ducaale/xh" # riscv64: blocked by rust/cargo # s390x: fails to build terminal_size crate arch="all !riscv64 !s390x" license="MIT" makedepends=" cargo cargo-auditable oniguruma-dev openssl-dev " subpackages=" $pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/ducaale/xh/archive/v$pkgver/xh-$pkgver.tar.gz" options="net" # fetch dependencies # Link with system-provided oniguruma library (instead building from source # and bundling). export RUSTONIG_DYNAMIC_LIBONIG=1 _cargo_opts="--frozen --no-default-features --features native-tls" prepare() { default_prepare cargo fetch --target="$CTARGET" --locked } build() { cargo auditable build $_cargo_opts --release } check() { cargo test $_cargo_opts } package() { install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/ ln -s xh "$pkgdir"/usr/bin/xhs install -Dm 644 doc/xh.1 "$pkgdir"/usr/share/man/man1/xh.1 install -Dm 644 completions/xh.bash "$pkgdir"/usr/share/bash-completion/completions/xh install -Dm 644 completions/xh.fish "$pkgdir"/usr/share/fish/vendor_completions.d/xh.fish install -Dm 644 completions/_xh "$pkgdir"/usr/share/zsh/site-functions/_xh } sha512sums=" b0bb4500856fb73650f13cd60245b7af23d70f6032b7fa27f54f6e0c5d7da7244d1e243988507c30dd49d9e6f0cd2f760567550adc4cf1418b2c83b2b48ebdde xh-0.18.0.tar.gz "