# Maintainer: omni pkgname=viu pkgver=1.4.0 pkgrel=3 pkgdesc="Terminal image viewer" # s390x: the trait `From` is not implemented for `u64` (in `terminal_size` crate) arch="all !s390x !riscv64" url="https://github.com/atanunq/viu" license="MIT" makedepends="cargo libsixel-dev cargo-auditable" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/atanunq/viu/archive/v$pkgver.tar.gz" prepare() { default_prepare # Build against system-provided sixel. local target=$(rustc -vV | sed -n 's/host: //p') mkdir -p .cargo cat >> .cargo/config.toml <<-EOF [target.$target] sixel = { rustc-link-lib = ["sixel"] } EOF cargo fetch --target="$CTARGET" --locked } build() { cargo auditable build --release --frozen --features sixel } check() { cargo test --frozen } package() { install -Dm0755 target/release/"$pkgname" -t "$pkgdir"/usr/bin install -Dm0644 README.md -t "$pkgdir"/usr/share/doc/"$pkgname" install -Dm0644 LICENSE-MIT -t "$pkgdir"/usr/share/licenses/"$pkgname" } sha512sums=" 6e0cbd678c8c9d0d100fca3d9fdac2223b088afca23982e98f9c51e93fd6490892fa46dcdfa7554277e52a5eeb40ca07799bce88eddc6e3c2f618b7595f046ec viu-1.4.0.tar.gz "