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

# Generated by rust2rpm 26
# * missing dev-dependencies: better-panic, color-eyre, fakeit
%bcond_with check
%global debug_package %{nil}

%global crate ratatui

Name:           rust-ratatui
Version:        0.26.3
Release:        %autorelease
Summary:        Library that's all about cooking up terminal user interfaces

License:        MIT
URL:            https://crates.io/crates/ratatui
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * Update compact_str to 0.8.0
Patch:          ratatui-fix-metadata.diff
# * Backport 6d210b3b6b195101e701630a916a253b6d16ad70 to 0.26.3: minor code
#   changes for compact_str 0.8.0
Patch10:       0001-chore-deps-update-compact_str-requirement-from-0.7.1.patch

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
A library that's all about cooking up terminal user interfaces.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/BREAKING-CHANGES.md
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%doc %{crate_instdir}/RELEASE.md
%doc %{crate_instdir}/SECURITY.md
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+default-devel %{_description}

This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+all-widgets-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+all-widgets-devel %{_description}

This package contains library source intended for building other packages which
use the "all-widgets" feature of the "%{crate}" crate.

%files       -n %{name}+all-widgets-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+crossterm-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+crossterm-devel %{_description}

This package contains library source intended for building other packages which
use the "crossterm" feature of the "%{crate}" crate.

%files       -n %{name}+crossterm-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+document-features-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+document-features-devel %{_description}

This package contains library source intended for building other packages which
use the "document-features" feature of the "%{crate}" crate.

%files       -n %{name}+document-features-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+macros-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+macros-devel %{_description}

This package contains library source intended for building other packages which
use the "macros" feature of the "%{crate}" crate.

%files       -n %{name}+macros-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+serde-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+serde-devel %{_description}

This package contains library source intended for building other packages which
use the "serde" feature of the "%{crate}" crate.

%files       -n %{name}+serde-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+termion-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+termion-devel %{_description}

This package contains library source intended for building other packages which
use the "termion" feature of the "%{crate}" crate.

%files       -n %{name}+termion-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+underline-color-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+underline-color-devel %{_description}

This package contains library source intended for building other packages which
use the "underline-color" feature of the "%{crate}" crate.

%files       -n %{name}+underline-color-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+unstable-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+unstable-devel %{_description}

This package contains library source intended for building other packages which
use the "unstable" feature of the "%{crate}" crate.

%files       -n %{name}+unstable-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+unstable-rendered-line-info-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+unstable-rendered-line-info-devel %{_description}

This package contains library source intended for building other packages which
use the "unstable-rendered-line-info" feature of the "%{crate}" crate.

%files       -n %{name}+unstable-rendered-line-info-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+unstable-widget-ref-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+unstable-widget-ref-devel %{_description}

This package contains library source intended for building other packages which
use the "unstable-widget-ref" feature of the "%{crate}" crate.

%files       -n %{name}+unstable-widget-ref-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+widget-calendar-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+widget-calendar-devel %{_description}

This package contains library source intended for building other packages which
use the "widget-calendar" feature of the "%{crate}" crate.

%files       -n %{name}+widget-calendar-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# remove executable bits from source files
find -type f -executable -print -exec chmod -x {} +

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
## START: Generated by rpmautospec
* Sat Aug 10 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.26.3-3
- Patch for compact_str 0.8.0

* Fri Aug 09 2024 Fabio Valentini <decathorpe@gmail.com> - 0.26.3-1
- Update to version 0.26.3

* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sat Apr 27 2024 Fabio Valentini <decathorpe@gmail.com> - 0.26.2-1
- Update to version 0.26.2; Fixes RHBZ#2223321

* Mon Feb 19 2024 Fabio Valentini <decathorpe@gmail.com> - 0.25.0-1
- Update to version 0.25.0

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Wed Jul 12 2023 Fabio Valentini <decathorpe@gmail.com> - 0.21.0-1
- Update to version 0.21.0; Fixes RHBZ#2214330

* Tue May 23 2023 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.20.1-1
- Initial Fedora package
## END: Generated by rpmautospec