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

%global crate x25519-dalek

Name:           rust-x25519-dalek
Version:        1.2.0
Release:        %autorelease
Summary:        X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek

License:        BSD-3-Clause
URL:            https://crates.io/crates/x25519-dalek
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# https://github.com/dalek-cryptography/x25519-dalek/issues/74 is the reason the zeroize version is pinned upstream,
# which isn't something we care about
Patch:          x25519-dalek-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using
curve25519-dalek.}

%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 LICENSE
%doc CHANGELOG.md
%doc 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}+fiat_u32_backend-devel
Summary:        %{summary}
BuildArch:      noarch

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%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