File rust-aes-0.6.spec of Package rust-aes-0.6

# rust-aes.spec
# Generated by rust2rpm 21
%bcond_without check
%global debug_package %{nil}

%global crate aes

Name:           rust-%{crate}-0.6
Version:        0.6.0
Release:        1%{?dist}
Summary:        Facade for AES (Rijndael) block ciphers implementations

# Upstream license specification: MIT OR Apache-2.0
License:        MIT or ASL 2.0
URL:            https://crates.io/crates/aes
Source:         https://crates.io/api/v1/crates/%crate/%version/download#/%crate-%version.crate
# Initial patched metadata
# * drop dependency on aesni (only required if aes and sse2 are enabled)
Patch0:         aes-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging >= 21
BuildRequires:  (crate(aes-soft/default) >= 0.6.0 with crate(aes-soft/default) < 0.7.0~)
BuildRequires:  (crate(cipher/default) >= 0.2.0 with crate(cipher/default) < 0.3.0~)
%if %{with check}
BuildRequires:  (crate(cipher/default) >= 0.2.0 with crate(cipher/default) < 0.3.0~)
BuildRequires:  (crate(cipher/dev) >= 0.2.0 with crate(cipher/dev) < 0.3.0~)
%endif

%global _description %{expand:
Facade for AES (Rijndael) block ciphers implementations.}

%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

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

%build
%cargo_build

%install
%cargo_install

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