From 845e923862cf2b30bd11b66855ef9dffe1d8c9fb Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Fri, 24 Dec 2021 07:38:23 +0900 Subject: [PATCH] new package: ncspot --- packages/ncspot/Cargo.toml.patch | 30 ++++++++++++++++++++++++++++++ packages/ncspot/build.sh | 18 ++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 packages/ncspot/Cargo.toml.patch create mode 100644 packages/ncspot/build.sh diff --git a/packages/ncspot/Cargo.toml.patch b/packages/ncspot/Cargo.toml.patch new file mode 100644 index 000000000..08964b007 --- /dev/null +++ b/packages/ncspot/Cargo.toml.patch @@ -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" diff --git a/packages/ncspot/build.sh b/packages/ncspot/build.sh new file mode 100644 index 000000000..f5ded0583 --- /dev/null +++ b/packages/ncspot/build.sh @@ -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 +}