# Contributor: Michał Polański # Maintainer: Michał Polański pkgname=himalaya pkgver=0.8.1 pkgrel=1 pkgdesc="CLI email client" url="https://github.com/soywod/himalaya" license="MIT" arch="all !ppc64le !riscv64 !s390x" # fails to build ring crate makedepends="cargo cargo-auditable sqlite-dev" subpackages=" $pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/soywod/himalaya/archive/v$pkgver/himalaya-$pkgver.tar.gz" options="net" # fetch dependencies _features="--no-default-features --features imap-backend,smtp-sender" prepare() { default_prepare cargo fetch --target="$CTARGET" --locked mkdir man-pages } build() { cargo auditable build --release --frozen $_features ./target/release/himalaya man man-pages ./target/release/himalaya completion bash > $pkgname.bash ./target/release/himalaya completion fish > $pkgname.fish ./target/release/himalaya completion zsh > $pkgname.zsh } check() { # skip imap backend e2e test cargo test --frozen $_features -- \ --skip test_imap_backend } package() { install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/ install -Dm644 man-pages/*.1 -t "$pkgdir"/usr/share/man/man1/ install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" ab8a3b4ae855d5d66d384472ce3ecb2b10a479e1bab1e59327d7e4405636ef4be32e1641c4bf256992d5a5115b5304e853d9c30270be82c73d4754591ac05455 himalaya-0.8.1.tar.gz "