# Generated by rust2rpm 27
%bcond check 1

%global crate chess-tui

Name:           rust-chess-tui
Version:        2.7.1
Release:        1%{?dist}
Summary:        Rusty chess game in your terminal 🦀

License:        MIT
URL:            https://crates.io/crates/chess-tui
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 24
BuildRequires:  pkgconfig(openssl)

%global _description %{expand:
A rusty chess game in your terminal 🦀.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
License:        (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib
# LICENSE.dependencies contains a full license breakdown

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

%files       -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc CONTRIBUTING.md
%doc README.md
%{_bindir}/chess-tui

%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}/CONTRIBUTING.md
%doc %{crate_instdir}/README.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}+chess-tui-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+chess-tui-devel %{_description}

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

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

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep_online

%build
%{cargo_license_summary_online}
%{cargo_license_online} > LICENSE.dependencies

%install
%cargo_install

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

%changelog
%autochangelog
