File mmtc.spec of Package mmtc

#
# spec file for package mmtc
#
# Copyright (c) 2024 mantarimay
#
# 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:           mmtc
Version:        0.3.2
Release:        0
Summary:        Minimal MPD terminal client
License:        MPL-2.0
URL:            https://github.com/figsoda/mmtc
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:        vendor.tar.zst
BuildRequires:  cargo-packaging
Recommends:     mpd

%description
Minimal MPD terminal client that aims to be simple yet highly configurable.

%prep
%autosetup -a1 -p1

%build
export GEN_ARTIFACTS="artifacts"
%{cargo_build}

%install
install -Dm755 target/release/%{name} -t %{buildroot}%{_bindir}
install -Dm644 artifacts/%{name}.1 -t %{buildroot}%{_mandir}/man1
install -Dm644 artifacts/%{name}.bash -t %{buildroot}%{_datadir}/bash-completion/completions
install -Dm644 artifacts/%{name}.fish -t %{buildroot}%{_datadir}/fish/vendor_completions.d
install -Dm644 artifacts/_%{name} -t %{buildroot}%{_datadir}/zsh/site-functions

%files
%license LICEN*
%doc README* Configuration.md CHANGELOG.md mmtc.ron
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.*
%{_datadir}/bash-completion/completions
%{_datadir}/fish
%{_datadir}/zsh

%changelog
openSUSE Build Service is sponsored by