# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate pgp Name: rust-pgp0.7 Version: 0.7.2 Release: %autorelease Summary: OpenPGP implementation in Rust License: MIT OR Apache-2.0 URL: https://crates.io/crates/pgp Source0: %{crates_source} # The tests are include in git via a submodule Source1: https://github.com/rpgp/tests/archive/2cc9065a8c34cbb18daf1b2999c48e43a7ef0f03/rpgp-tests-2cc9065.tar.gz # Manually created patch for downstream crate metadata changes Patch0: pgp-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21 %global _description %{expand: OpenPGP implementation in Rust.} %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-APACHE %license LICENSE-MIT %license LICENSE.md %doc PLATFORMS.md %doc README.md %doc STATUS.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}+asm-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+asm-devel %{_description} This package contains library source intended for building other packages which use the "asm" feature of the "%{crate}" crate. %files -n %{name}+asm-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+getrandom-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+getrandom-devel %{_description} This package contains library source intended for building other packages which use the "getrandom" feature of the "%{crate}" crate. %files -n %{name}+getrandom-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gperftools-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gperftools-devel %{_description} This package contains library source intended for building other packages which use the "gperftools" feature of the "%{crate}" crate. %files -n %{name}+gperftools-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}+profile-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+profile-devel %{_description} This package contains library source intended for building other packages which use the "profile" feature of the "%{crate}" crate. %files -n %{name}+profile-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+wasm-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+wasm-devel %{_description} This package contains library source intended for building other packages which use the "wasm" feature of the "%{crate}" crate. %files -n %{name}+wasm-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 -b 0 mkdir tests/tests gzip -cd "%{SOURCE1}" | tar -C tests/tests --strip-components=1 -xvf - %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog