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.
92 lines
2.3 KiB
92 lines
2.3 KiB
# Generated by rust2rpm 22
|
|
# * missing dev-dependency: rstest
|
|
%bcond_with check
|
|
|
|
%global crate zoxide
|
|
|
|
Name: rust-zoxide
|
|
Version: 0.8.3
|
|
Release: %autorelease
|
|
Summary: Smarter cd command for your terminal
|
|
|
|
License: MIT
|
|
URL: https://crates.io/crates/zoxide
|
|
Source0: %{crates_source}
|
|
Source1: LICENSE.dependencies
|
|
# 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
|
|
|
|
ExclusiveArch: %{rust_arches}
|
|
|
|
BuildRequires: rust-packaging >= 21
|
|
|
|
%global _description %{expand:
|
|
Smarter cd command for your terminal.}
|
|
|
|
%description %{_description}
|
|
|
|
%package -n %{crate}
|
|
Summary: %{summary}
|
|
# ASL 2.0 or MIT
|
|
# CC0
|
|
# MIT
|
|
# MIT or ASL 2.0
|
|
# Unlicense or MIT
|
|
License: MIT and CC0
|
|
# LICENSE.dependencies contains a full license breakdown
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
%files -n %{crate}
|
|
%license LICENSE
|
|
%license LICENSE.dependencies
|
|
%doc CHANGELOG.md
|
|
%doc README.md
|
|
%{_bindir}/zoxide
|
|
%{_mandir}/man1/%{crate}*.1*
|
|
%{_datadir}/bash-completion/completions/%{crate}
|
|
%dir %{_datadir}/zsh
|
|
%dir %{_datadir}/zsh/site-functions
|
|
%{_datadir}/zsh/site-functions/_%{crate}
|
|
%dir %{_datadir}/fish
|
|
%dir %{_datadir}/fish/vendor_completions.d
|
|
%{_datadir}/fish/vendor_completions.d/%{crate}.fish
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
|
cp %{SOURCE1} .
|
|
%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
|
|
|
|
%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 %{buildroot}%{_datadir}/bash-completion/completions/%{crate}
|
|
install -Dpm 644 contrib/completions/_%{crate} -t %{buildroot}%{_datadir}/zsh/site-functions/
|
|
install -Dpm 644 contrib/completions/%{crate}.fish -t %{buildroot}/%{_datadir}/fish/vendor_completions.d/
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|
|
%autochangelog
|