File rust-blake2.spec of Package rust-blake2

# Generated by rust2rpm 28
%bcond_without check
%global debug_package %{nil}

%global crate blake2

Name:           rust-%{crate}
Version:        0.11.0
Release:        1%{?dist}
Summary:        BLAKE2 hash functions

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/blake2
Source:         https://static.crates.io/crates/%crate/%version/download#/%crate-%version.crate

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
BLAKE2 hash functions.}

%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-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/CHANGELOG.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}+alloc-devel
Summary:        %{summary}
BuildArch:      noarch

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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