# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} # prevent executables from being installed %global cargo_install_bin 0 %global crate az-snp-vtpm # compile and run tests only on supported architectures %global supported_arches x86_64 Name: rust-az-snp-vtpm Version: 0.7.1 Release: %autorelease Summary: VTPM based SEV-SNP attestation for Azure Confidential VMs License: MIT URL: https://crates.io/crates/az-snp-vtpm Source: %{crates_source} # * The crate does not contain LICENSE; Get it from upstream git repo # * http://github.com/kinvolk/azure-cvm-tooling/ # * A patch was sent upstream: # * https://github.com/kinvolk/azure-cvm-tooling/pull/64 Source11: https://raw.githubusercontent.com/kinvolk/azure-cvm-tooling/2bef60b88db7554935177ec63dd169190a39eab7/LICENSE # * required by tests Source12: https://raw.githubusercontent.com/kinvolk/azure-cvm-tooling/2bef60b88db7554935177ec63dd169190a39eab7/az-cvm-vtpm/test/hcl-report-snp.bin # * required by tests Source13: https://raw.githubusercontent.com/kinvolk/azure-cvm-tooling/2bef60b88db7554935177ec63dd169190a39eab7/az-cvm-vtpm/test/certs.pem BuildRequires: cargo-rpm-macros >= 26 %global _description %{expand: VTPM based SEV-SNP attestation for Azure Confidential VMs.} %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 %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}+attester-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+attester-devel %{_description} This package contains library source intended for building other packages which use the "attester" feature of the "%{crate}" crate. %files -n %{name}+attester-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+openssl-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+openssl-devel %{_description} This package contains library source intended for building other packages which use the "openssl" feature of the "%{crate}" crate. %files -n %{name}+openssl-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+verifier-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+verifier-devel %{_description} This package contains library source intended for building other packages which use the "verifier" feature of the "%{crate}" crate. %files -n %{name}+verifier-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 cp -f %{SOURCE11} . %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %ifarch %{supported_arches} %cargo_build %endif %install %cargo_install %if %{with check} %ifarch %{supported_arches} %check mkdir -p ../test cp -f %{SOURCE12} %{SOURCE13} ../test %cargo_test %endif rm -rf ../test %endif %changelog %autochangelog