# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate cryptoki-sys Name: rust-cryptoki-sys Version: 0.3.0 Release: %autorelease Summary: FFI wrapper around the PKCS #11 API License: Apache-2.0 URL: https://crates.io/crates/cryptoki-sys Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Bump of libloading and bindgen versions # * https://github.com/parallaxsecond/rust-cryptoki/pull/261 Patch: cryptoki-sys-fix-metadata.diff # * unconditionally rebuild bindings with bindgen to support more architectures Patch2: 0001-Unconditionally-rebuild-bindings-to-support-all-arch.patch BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: FFI wrapper around the PKCS #11 API.} %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}+bindgen-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+bindgen-devel %{_description} This package contains library source intended for building other packages which use the "bindgen" feature of the "%{crate}" crate. %files -n %{name}+bindgen-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+generate-bindings-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+generate-bindings-devel %{_description} This package contains library source intended for building other packages which use the "generate-bindings" feature of the "%{crate}" crate. %files -n %{name}+generate-bindings-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 %changelog %autochangelog