Blob Blame History Raw
# Generated by rust2rpm 16
%bcond_without check
%global __cargo_skip_build 0

%global crate tealdeer

Name:           rust-%{crate}
Version:        1.4.1
Release:        3%{?dist}
Summary:        Fetch and show tldr help pages for many CLI commands

# Upstream license specification: MIT/Apache-2.0
License:        MIT or ASL 2.0
URL:            https://crates.io/crates/tealdeer
Source:         %{crates_source}
# Initial patched metadata
# * keep using app_dirs instead of app_dirs2 fork
# * relax exact remove_dir_all dependency
# * bump pager from 0.15 to 0.16
Patch0:         tealdeer-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging

%global _description %{expand:
Fetch and show tldr help pages for many CLI commands. Full featured offline
client with caching support.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# Install all deps (without check), grab their licenses and make it simple
# * ASL 2.0
# * ASL 2.0 or MIT
# * MIT
# * MIT or ASL 2.0
# * Unlicense or MIT
# * zlib
License:        MIT or ASL 2.0 and zlib

%description -n %{crate} %{_description}

%files       -n %{crate}
%license LICENSE-MIT LICENSE-APACHE
%doc README.md
%{_bindir}/tldr
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/tldr.bash
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/tldr.fish

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install
install -Dpm0644 bash_tealdeer %{buildroot}%{_datadir}/bash-completion/completions/tldr.bash
install -Dpm0644 fish_tealdeer %{buildroot}%{_datadir}/fish/vendor_completions.d/tldr.fish

%if %{with check}
%check
# integration tests need a working internet connection
%cargo_test -- --bins
%endif

%changelog
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Tue Dec 15 2020 Fabio Valentini <decathorpe@gmail.com> - 1.4.1-2
- Bump to pager 0.16.

* Tue Oct 20 2020 Fabio Valentini <decathorpe@gmail.com> - 1.4.1-1
- Update to version 1.4.1.

* Sun Aug 16 15:01:50 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.3.0-5
- Rebuild

* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Fri Mar 27 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.3.0-2
- Fixup license

* Fri Mar 06 07:32:54 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.3.0-1
- Initial package