mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-12 15:18:22 +02:00
- enable on all architectures - use default features $_features was added with5b69fcb31e
to use the native-tls crate since 0.8.0, rustls is the only TLS provider for himalaia and native-tls was removed from $_features with8cc10c1314
77 lines
1.9 KiB
Text
77 lines
1.9 KiB
Text
# Contributor: Michał Polański <michal@polanski.me>
|
|
# Maintainer: Michał Polański <michal@polanski.me>
|
|
pkgname=himalaya
|
|
pkgver=1.1.0
|
|
pkgrel=0
|
|
pkgdesc="CLI email client"
|
|
url="https://github.com/soywod/himalaya"
|
|
license="MIT"
|
|
arch="all"
|
|
depends="notmuch"
|
|
makedepends="
|
|
bzip2-dev
|
|
cargo
|
|
cargo-auditable
|
|
gpgme-dev
|
|
libgpg-error-dev
|
|
notmuch-dev
|
|
sqlite-dev
|
|
zstd-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
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
mkdir man-pages
|
|
|
|
# Rust target triple
|
|
local target=$(rustc -vV | sed -n 's/host: //p')
|
|
|
|
# build against system-provided libs
|
|
mkdir -p .cargo
|
|
cat >> .cargo/config.toml <<-EOF
|
|
[target.$target]
|
|
bzip2 = { rustc-link-lib = ["bz2"] }
|
|
zstd = { rustc-link-lib = ["zstd"] }
|
|
EOF
|
|
}
|
|
|
|
build() {
|
|
cargo auditable build --release --frozen
|
|
|
|
./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() {
|
|
# Increase stack size to avoid stack overflow while compiling 'p384'.
|
|
export RUST_MIN_STACK="4194304"
|
|
|
|
cargo test --frozen
|
|
}
|
|
|
|
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="
|
|
5e4389942eda1979c4e0a6ef93a7aa28bad9a94dca9373412d286bc5b0dd14f5489a3366868fc3a89aa09cedb2e386dd838faca2c99a0dc235cfeb5865d86c82 himalaya-1.1.0.tar.gz
|
|
"
|