File spotify-player.spec of Package spotify-player

#
# spec file for package spotify-player
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

Name:           spotify-player
Version:        0.21.2
Release:        0
Summary:        Spotify player in the terminal with full feature parity
Group:          Productivity/Multimedia/Sound/Players
License:        MIT
URL:            https://github.com/aome510/spotify-player
Source0:        %{name}-%{version}.tar.zst
Source1:        vendor.tar.zst
BuildRequires:  cargo
BuildRequires:  cargo-packaging
BuildRequires:  libpulse-devel
BuildRequires:  libsixel-devel
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(libssl)
Recommends:     fzf
Recommends:     libnotify-tools

%define build_features "pulseaudio-backend media-control notify daemon image sixel fzf"

%description
spotify player is a fast, easy to use, and configurable terminal spotify client.

%prep
%autosetup -p1 -a1

%build
export CARG_HOME=$PWD/.cargo
cargo build --frozen --release --bin spotify_player --no-default-features --features %{build_features}

%install
export CARGO_HOME=$PWD/.cargo
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/spotify_player %{buildroot}%{_bindir}/spotify_player

%files
%{_bindir}/spotify_player
%doc README.md docs/config.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by