diff options
Diffstat (limited to 'community/ncspot/APKBUILD')
-rw-r--r-- | community/ncspot/APKBUILD | 64 |
1 files changed, 45 insertions, 19 deletions
diff --git a/community/ncspot/APKBUILD b/community/ncspot/APKBUILD index 32df72203b4..836569f7ce5 100644 --- a/community/ncspot/APKBUILD +++ b/community/ncspot/APKBUILD @@ -1,45 +1,66 @@ # Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=ncspot -pkgver=0.9.4 +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) -_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 - # Optimize binary for size (18 MiB -> 8.2 MiB). + # 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 - [profile.release] - codegen-units = 1 - lto = true - opt-level = "z" - panic = "abort" + [patch.crates-io] + notify-rust = { path = "vendor/notify-rust" } + rspotify = { path = "vendor/rspotify" } EOF - cargo fetch --locked + + cargo fetch --target="$CTARGET" --locked } build() { - cargo build $_cargo_opts --release + cargo auditable build $_cargo_opts --release } check() { @@ -47,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=" -60bd72769c6c31361328184b7e9e973b1a16a49f92d03cfe8c6fc39c51f8812fd0240893c1ffec52549514a9b86282c5504d25bf39a265ab7d5d5a8bcebbdaef ncspot-0.9.4.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 " |