File tinty.spec of Package tinty

#
# spec file for package tinty
#
# Copyright (c) 2025 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/
#


Name:           tinty
Version:        0.27.0~0
Release:        0
Summary:        A Tinted Theming CLI tool written in Rust
License:        MIT
Url:            https://github.com/tinted-theming/tinty
Source0:        %{name}-%{version}.tar.zst
Source1:        vendor.tar.zst
BuildRequires:  cargo
BuildRequires:  cargo-packaging
ExclusiveArch:  %{rust_tier1_arches}

%description
Tinty is a Base16 and Base24 theming manager for all Tinted Theming projects including
any third-party template repository that follows the Base16 builder specification.

Change the theme of your terminal, text editor and anything else with one command.
Immediately switch between over 250 themes!

%package bash-completion
Summary:        Bash Completion for %{name}
Group:          System/Shells
Requires:       %{name} = %{version}
Requires:       bash-completion
Supplements:    (%{name} and bash)
BuildArch:      noarch

%description bash-completion
The official bash completion script for tinty.

%package zsh-completion
Summary:        ZSH Completion for %{name}
Group:          System/Shells
Requires:       %{name} = %{version}
Supplements:    (%{name} and zsh)
BuildArch:      noarch

%description zsh-completion
The official zsh completion script for tinty.

%package fish-completion
Summary:        Fish Completion for %{name}
Group:          System/Shells
Requires:       %{name} = %{version}
Supplements:    (%{name} and fish)
BuildArch:      noarch

%description fish-completion
The official fish completion script for tinty.

%prep
%autosetup -p1 -a1

%build
%{cargo_build}

%install
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm 644 contrib/completion/tinty.bash %{buildroot}%{_datadir}/bash-completion/completions/tinty
install -Dm 644 contrib/completion/tinty.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/tinty.fish
install -Dm 644 contrib/completion/tinty.zsh %{buildroot}%{_datadir}/zsh/site-functions/_tinty

%files
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/%{name}

%files bash-completion
%license LICENSE
%{_datadir}/bash-completion

%files fish-completion
%license LICENSE
%{_datadir}/fish

%files zsh-completion
%license LICENSE
%{_datadir}/zsh

%changelog
openSUSE Build Service is sponsored by