%bcond_without check
%global __cargo_skip_build 0
%global crate rpg-cli
Name: %{crate}
Version: 1.0.0
Release: %autorelease
Summary: JRPG-inspired terminal game
# Upstream license specification: MIT
License: MIT and ASL 2.0 and CC0 and Unlicense and MPLv2.0 and Boost
URL: https://github.com/facundoolano/rpg-cli
Source: %{url}/archive/refs/tags/%{version}.tar.gz
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
%global _description %{expand:
rpg-cli is a bare-bones JRPG-inspired terminal game written in Rust.}
%description %{_description}
%files
%license LICENSE
%doc README.md CHANGELOG.md
%{_bindir}/rpg-cli
%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
%autochangelog