## START: Set by rpmautospec
## (rpmautospec version 0.2.5)
%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
    release_number = 6;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
## END: Set by rpmautospec

# Generated by rust2rpm 20
%bcond_without check

%global crate gitui

Name:           rust-%{crate}
Version:        0.16.2
Release:        %autorelease
Summary:        Blazing fast terminal-ui for git

# Upstream license specification: MIT
License:        MIT
URL:            https://crates.io/crates/gitui
Source:         %{crates_source}
# Initial patched metadata
# * bump crossterm from 0.19 to 0.22
# * bump tui from 0.15 to 0.17
# * drop unused optional pprof dependency
Patch0:         gitui-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging

%global _description %{expand:
Blazing fast terminal-ui for git.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# 0BSD or MIT or ASL 2.0
# ASL 2.0
# ASL 2.0 or Boost
# BSD
# MIT
# MIT or ASL 2.0
# MIT or ASL 2.0 or zlib
# MIT or zlib or ASL 2.0
# Unlicense or MIT
# zlib or ASL 2.0 or MIT
License:        MIT and ASL 2.0 and BSD

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

%files       -n %{crate}
%license LICENSE.md
%doc CHANGELOG.md KEY_CONFIG.md README.md THEMES.md
%{_bindir}/gitui

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

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
* Sun Feb 13 2022 Fabio Valentini <decathorpe@gmail.com> 0.16.2-6
- Bump crossterm from 0.19 to 0.22, bump tui from 0.15 to 0.17

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.16.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sun Nov 28 2021 Igor Raits <ignatenkobrain@fedoraproject.org> 0.16.2-4
- Rebuild for libgit2 1.3.x

* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> 0.16.2-3
- Rebuilt with OpenSSL 3.0.0

* Sat Aug 07 2021 Fabio Valentini <decathorpe@gmail.com> 0.16.2-2
- Rebuild with crossbeam-deque 0.8.1 / 0.7.4 for CVE-2021-32810

* Sat Jul 24 2021 Igor Raits <ignatenkobrain@fedoraproject.org> 0.16.2-1
- Update to 0.16.2

* Tue Jul 06 2021 Davide Cavalca <dcavalca@fedoraproject.org> 0.13.0-2
- Bump simplelog to 0.10

* Sun Mar 21 2021 Igor Raits <ignatenkobrain@fedoraproject.org> 0.13.0-1
- Update to 0.13.0

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> 0.11.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Sun Jan 10 2021 Igor Raits <ignatenkobrain@fedoraproject.org> 0.11.0-3
- Update to 0.11.0

* Tue Dec 29 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.11.0-2
- Rebuild against libgit2 1.1.x

* Mon Dec 28 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.11.0-1
- Update to 0.11.0

* Sat Aug 29 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.10.0-1
- Update to 0.10.0

* Sat Aug 29 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.9.1-1
- Update to 0.9.1

* Tue Aug 18 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.9.0-1
- Update to 0.9.0

* Sun Aug 16 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.8.1-4
- Rebuild

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

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

* Fri Jul 10 2020 Josh Stone <jistone@redhat.com> 0.8.1-1
- Update to 0.8.1

* Mon Jul 06 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.8.0-1
- Update to 0.8.0

* Mon Jun 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.7.0-1
- Update to 0.7.0

* Thu Jun 11 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.6.0-2
- Update license list

* Wed Jun 10 2020 Josh Stone <jistone@redhat.com> 0.6.0-1
- Update to 0.6.0

* Mon Jun 01 2020 Josh Stone <jistone@redhat.com> 0.5.0-1
- Update to 0.5.0

* Thu May 28 2020 Igor Raits <ignatenkobrain@fedoraproject.org> 0.4.0-1
- Initial import