File spotify-tui.spec of Package spotify-tui

#
# spec file for package spotify-tui
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#


%bcond_without check
Name:           spotify-tui
Version:        0.25.0
Release:        0
Summary:        Spotify for the terminal written in Rust
License:        MIT
Group:          Productivity/Multimedia/Other
URL:            https://github.com/Rigellute/spotify-tui
Source0:        %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        vendor.tar.zst
BuildRequires:  cargo >= 1.81.0
BuildRequires:  cargo-packaging
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  update-desktop-files
ExclusiveArch:  %{rust_arches}

%description
A Spotify client for the terminal written in Rust.

%prep
%autosetup -p1 -a1
sed -i 's/\(Icon=\).*/\1spt/' snap/gui/spt.desktop

%build
%{cargo_build}

%install
%{cargo_install}
install -Dm 0644 snap/gui/spt.desktop %{buildroot}%{_datadir}/applications/spt.desktop
install -Dm 0644 snap/gui/spt.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/spt.png
%suse_update_desktop_file -r spt AudioVideo Audio Player

%if %{with check}
%check
%{cargo_test}
%endif

%files
%doc CHANGELOG.md README.md
%{_bindir}/spt
%{_datadir}/applications/spt.desktop
%{_datadir}/icons/hicolor/*/apps/spt.??g
%license LICENSE

%changelog
openSUSE Build Service is sponsored by