aboutsummaryrefslogtreecommitdiffstats
path: root/community/himalaya/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/himalaya/APKBUILD')
-rw-r--r--community/himalaya/APKBUILD54
1 files changed, 41 insertions, 13 deletions
diff --git a/community/himalaya/APKBUILD b/community/himalaya/APKBUILD
index 8534d1a3cf1..ba6c428f1f6 100644
--- a/community/himalaya/APKBUILD
+++ b/community/himalaya/APKBUILD
@@ -1,24 +1,49 @@
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=himalaya
-pkgver=0.5.10
-pkgrel=1
+pkgver=0.9.0
+pkgrel=0
pkgdesc="CLI email client"
url="https://github.com/soywod/himalaya"
-license="BSD-4-Clause"
-arch="all !s390x !riscv64" # blocked by rust/cargo
-makedepends="cargo openssl-dev>3"
-subpackages="$pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion"
-source="https://github.com/soywod/himalaya/archive/v$pkgver/himalaya-$pkgver.tar.gz"
+license="MIT"
+arch="all !ppc64le !riscv64 !s390x" # fails to build ring crate
+makedepends="cargo cargo-auditable bzip2-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
+ cargo-update-libc-lfs64.patch
+ "
+options="net" # fetch dependencies
+
+_features="--no-default-features --features imap-backend,smtp-sender,pgp-commands"
+
prepare() {
default_prepare
- cargo fetch --locked
+ 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 build --release --frozen
+ 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
@@ -27,18 +52,21 @@ build() {
check() {
# skip imap backend e2e test
- cargo test --frozen -- \
+ cargo test --frozen $_features -- \
--skip test_imap_backend
}
package() {
- install -Dm755 target/release/himalaya "$pkgdir"/usr/bin/himalaya
+ 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/completions/$pkgname.fish
+ 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="
-0180ad71499109be65554a8176bffbad5c63f092b88b80bb8e82426dbc397c23f271ef4cc05fa42338a4671aca50b5ba9fd8eef7e78eef04533e7a35ee925550 himalaya-0.5.10.tar.gz
+0233289968a80672e39d7cd133f14bb9cd27129f389fccc4b366844389395a5bbfb89184e4d2b2ef2ecbbcaaf959a679f937f4b4b7c6018a52269a196c4af551 himalaya-0.9.0.tar.gz
+a07efe929420577315ce1c66f065f72f2574ad863531192c70980e0cfc586af151aafb417adc8c409a549478e5284c0cb6fb7289c95b520ade13507ceab750a4 cargo-update-libc-lfs64.patch
"