## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    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 27
%bcond check 1

%global crate snpguest

# compile and run tests only on supported architectures
%global supported_arches x86_64

Name:           rust-snpguest
Version:        0.8.2
Release:        %autorelease
Summary:        AMD SEV-SNP guest utility tool

License:        Apache-2.0
URL:            https://crates.io/crates/snpguest
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Navigation utility for AMD SEV-SNP guest environment.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}

# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0
# Apache-2.0 OR MIT
# BSD-3-Clause
# MIT
# MIT OR Apache-2.0
# MPL-2.0
# Unlicense OR MIT
License:        Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT)

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

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

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

%generate_buildrequires
%cargo_generate_buildrequires

%build
%ifarch %{supported_arches}
%cargo_build
%endif
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies

%install
%cargo_install

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

%changelog
## START: Generated by rpmautospec
* Wed Jan 29 2025 John Doe <packager@example.com> - 0.8.2-1
- Uncommitted changes
## END: Generated by rpmautospec