aboutsummaryrefslogtreecommitdiffstats
path: root/community/ncspot/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ncspot/APKBUILD')
-rw-r--r--community/ncspot/APKBUILD67
1 files changed, 48 insertions, 19 deletions
diff --git a/community/ncspot/APKBUILD b/community/ncspot/APKBUILD
index ace49072611..836569f7ce5 100644
--- a/community/ncspot/APKBUILD
+++ b/community/ncspot/APKBUILD
@@ -1,42 +1,66 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ncspot
-pkgver=0.9.8
+pkgver=1.1.0
pkgrel=0
pkgdesc="Cross-platform ncurses Spotify client inspired by ncmpc and the likes"
url="https://github.com/hrkfdn/ncspot"
-# ppc64le: fails to build ring crate
-# others: limited by rust/cargo
-arch="aarch64 armhf armv7 x86 x86_64"
+# riscv64: takes eternity to build
+# s390x: fails to build nix crate
+arch="all !riscv64 !s390x"
license="BSD-2-Clause"
makedepends="
cargo
- dbus-dev
+ cargo-auditable
libxcb-dev
ncurses-dev
- openssl-dev
+ openssl-dev>3
pulseaudio-dev
python3
"
-source="https://github.com/hrkfdn/ncspot/archive/v$pkgver/ncspot-$pkgver.tar.gz"
+_rspotify_ver=0.12.0
+_notify_rust_ver=4.10.0
+source="https://github.com/hrkfdn/ncspot/archive/v$pkgver/ncspot-$pkgver.tar.gz
+ https://github.com/ramsayleung/rspotify/archive/v$_rspotify_ver/rspotify-$_rspotify_ver.tar.gz
+ https://github.com/hoodie/notify-rust/archive/v$_notify_rust_ver/notify-rust-$_notify_rust_ver.tar.gz
+ no-rustls.patch
+ rspotify-fix-ureq-native-tls.patch
+ notify-rust-zbus-v4.patch
+ cargo.lock.patch
+ "
options="!check" # there's only one unit test (in v0.8.1)
-# Optimize binary for size (18 MiB -> 8.2 MiB in v0.8.1).
-export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
-export CARGO_PROFILE_RELEASE_LTO="true"
-export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
-export CARGO_PROFILE_RELEASE_PANIC="abort"
-
-_cargo_opts='--frozen --features cover,share_selection'
+# Build with ncurses_backend instead of termion_backend, enable cover and share_selection.
+_cargo_opts="
+ --frozen
+ --no-default-features
+ --features share_clipboard,pulseaudio_backend,mpris,notify,cover,share_selection,ncurses_backend
+ "
prepare() {
+ mkdir -p vendor
+ mv "$srcdir"/rspotify-$_rspotify_ver vendor/rspotify
+ mv "$srcdir"/notify-rust-$_notify_rust_ver vendor/notify-rust
+
default_prepare
- cargo fetch --locked
+ # Build with patched notify-rust and rspotify (see *.patch files).
+ # TODO: Remove notify-rust after https://github.com/hoodie/notify-rust/pull/202
+ # is merged and released.
+ # TODO: Remove rspotify after https://github.com/ramsayleung/rspotify/pull/471
+ # is released and ncspot moved to this version.
+ cat >> Cargo.toml <<-EOF
+
+ [patch.crates-io]
+ notify-rust = { path = "vendor/notify-rust" }
+ rspotify = { path = "vendor/rspotify" }
+ EOF
+
+ cargo fetch --target="$CTARGET" --locked
}
build() {
- cargo build $_cargo_opts --release
+ cargo auditable build $_cargo_opts --release
}
check() {
@@ -44,10 +68,15 @@ check() {
}
package() {
- cargo install $_cargo_opts --offline --path . --root="$pkgdir/usr"
- rm "$pkgdir"/usr/.crates*
+ install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}
sha512sums="
-f6c9548c236c147154e2be9e3df35407a9fff78ffce8c5e5d46064b27c7d28a1ca436c72e64a384244cfc01d127bcfbd1f80c272ce6dfa6dbff9093d76addb91 ncspot-0.9.8.tar.gz
+e07e119e682649428aeabebd2ae882b0111a83e0f1bc3c47843f38351a9d833c7cbace48f777bca3edbebe58b9dd55e8135becbdc4693560a307667fd0f2b2e9 ncspot-1.1.0.tar.gz
+83d8a2ffc67f9a8986bac01e330a24ef764bc65f8bc8d2b5a96c46082a5d5bcc7f7659e259cb6bd30a32e4abaadb889be1953f97491cf1e34865cc734b0a55bf rspotify-0.12.0.tar.gz
+dbff70bee81513af930dd2147037e28ac06affe2ffbae4528c343d42aac27d683a205dc1c7e1ae1b10812148e96ed179e257c32feead833de3800056a1db95bf notify-rust-4.10.0.tar.gz
+0142b6d01fa500454130040095730a28fa51f697e5c0d2aa4046e29a18ba9c7161256683609c3233a28d0bdd2aff84e1297fc81376099624f7401ef45cee3c0f no-rustls.patch
+4610754ce0d760854ebefc0a6bf99afe5c4294c05119dd5f94b7294fda0b98b193ff596df4ae255d86ff6e77922ab4a53394f92c28d48a3f59e4a8bfe1381f01 rspotify-fix-ureq-native-tls.patch
+e8b33f6a0c3614cf6741f81868bb87f02e2338fc4a2e726f9b1bfe5e2b21e12907933e16615a2d668ce42f0d95a299cb99086506488f49b91dfa884ef5d4c227 notify-rust-zbus-v4.patch
+02a9a85e57f80cf11e86f813cd71ded28e1de0bcaa424de76d01faa7ed142699ed6465ff6b1109bd4e01bb1070b234e193a597db5fe38706454002f3a4438976 cargo.lock.patch
"