# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate native-ossl-sys Name: rust-%{crate} Version: 0.1.3 Release: 1%{?dist} Summary: Low-level OpenSSL bindings generated by bindgen License: Apache-2.0 URL: https://crates.io/crates/%{crate} Source: %{crates_source} # LICENSE lives at workspace root; symlinked into the crate dir since 0.1.4. # For 0.1.3 it must be supplied separately. Source1: LICENSE # Relax bindgen build-dependency to the version packaged in Fedora (0.72.x). # The published crate pins "0.71" but any >=0.70 release is compatible. Patch0: Cargo.toml.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: openssl-devel BuildRequires: llvm BuildRequires: clang %global _description %{expand: Low-level unsafe Rust bindings to the system OpenSSL library, generated by bindgen at build time. Provides the raw FFI surface used by the native-ossl crate.} %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}+fips-provider-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+fips-provider-devel %{_description} This package contains library source intended for building other packages which use the "fips-provider" feature of the "%{crate}" crate. The fips-provider feature requires the OpenSSL source tree (OPENSSL_SOURCE_DIR) at build time to generate bindings for non-public OpenSSL headers. %files -n %{name}+fips-provider-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 install -Dm644 %{SOURCE1} %{buildroot}%{crate_instdir}/LICENSE %if %{with check} %check %cargo_test %endif %changelog