new package: ncspot

This commit is contained in:
Tee KOBAYASHI 2021-12-24 07:38:23 +09:00 committed by Leonid Pliushch
parent 8fa827232f
commit 845e923862
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,30 @@
Backported from
https://github.com/hrkfdn/ncspot/commit/487bc0dba0acac0a57227bc090fc5d82eea0af15
and modified so that `termion_backend` is used by default.
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,7 +45,7 @@
regex = "1"
ioctl-rs = { version = "0.2", optional = true }
serde_cbor = "0.11.2"
-pancurses = { version = "0.17.0", features = ["win32"] }
+pancurses = { version = "0.17.0", features = ["win32"], optional = true }
[dependencies.rspotify]
version = "0.11.3"
@@ -65,10 +65,11 @@
rodio_backend = ["librespot-playback/rodio-backend"]
portaudio_backend = ["librespot-playback/portaudio-backend"]
termion_backend = ["cursive/termion-backend"]
+pancurses_backend = ["cursive/pancurses-backend"]
mpris = ["dbus", "dbus-tree"]
notify = ["notify-rust"]
cover = ["ioctl-rs"]
-default = ["share_clipboard", "pulseaudio_backend", "mpris", "notify", "cursive/pancurses-backend"]
+default = ["share_clipboard", "pulseaudio_backend", "mpris", "notify", "termion_backend"]
[package.metadata.deb]
depends = "$auto, pulseaudio"

18
packages/ncspot/build.sh Normal file
View File

@ -0,0 +1,18 @@
TERMUX_PKG_HOMEPAGE=https://github.com/hrkfdn/ncspot
TERMUX_PKG_DESCRIPTION="An ncurses Spotify client written in Rust"
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.9.3
TERMUX_PKG_SRCURL=https://github.com/hrkfdn/ncspot/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=ed873d007ce356e8c6eed56226533b686682a98d2a37487668416539d4e10e78
TERMUX_PKG_DEPENDS="dbus, pulseaudio"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make() {
termux_setup_rust
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
}
termux_step_make_install() {
install -Dm755 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/ncspot
}