You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-zoxide/rust-zoxide.spec

90 lines
2.3 KiB

# Generated by rust2rpm 24
# * missing dev-dependencies: rstest ^0.18, rstest-reuse ^0.6
%bcond_with check
%global crate zoxide
Name: rust-zoxide
Version: 0.9.2
Release: %autorelease
Summary: Smarter cd command for your terminal
License: MIT
URL: https://crates.io/crates/zoxide
Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies
Patch: zoxide-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * drop incompatible compiler flag settings (strip = true, debug = 0)
Patch: zoxide-fix-metadata.diff
BuildRequires: rust-packaging >= 23
%global _description %{expand:
A smarter cd command for your terminal.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# CC0-1.0 OR MIT-0 OR Apache-2.0
# MIT
# MIT OR Apache-2.0
# MPL-2.0
License: MIT AND MPL-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (CC0-1.0 OR MIT-0 OR Apache-2.0)
# LICENSE.dependencies contains a full license breakdown
# recommend fuzzy finder for interactive completions
Recommends: fzf
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc CHANGELOG.md
%doc README.md
%{_bindir}/zoxide
%{_mandir}/man1/%{crate}*.1*
%{bash_completions_dir}/%{crate}.bash
%{fish_completions_dir}/%{crate}.fish
%{zsh_completions_dir}/_%{crate}
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%if %{with check}
echo '/usr/bin/bash'
echo '/usr/bin/fish'
echo '/usr/bin/shellcheck'
echo '/usr/bin/xonsh'
echo '/usr/bin/zsh'
%endif
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
# install manpages
install -Dpm 644 man/man1/%{crate}*.1 -t %{buildroot}%{_mandir}/man1/
# install shell completions
install -Dpm 644 contrib/completions/%{crate}.bash -t %{buildroot}/%{bash_completions_dir}/
install -Dpm 644 contrib/completions/%{crate}.fish -t %{buildroot}/%{fish_completions_dir}/
install -Dpm 644 contrib/completions/_%{crate} -t %{buildroot}/%{zsh_completions_dir}/
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog