# Generated by rust2rpm 23 %bcond_without check %global crate bindgen-cli Name: rust-bindgen-cli Version: 0.62.0 Release: %autorelease Summary: Automatically generates Rust FFI bindings to C and C++ libraries License: BSD-3-Clause URL: https://crates.io/crates/bindgen-cli Source0: %{crates_source} # https://github.com/rust-lang/rust-bindgen/pull/2352 Source1: https://github.com/rust-lang/rust-bindgen/raw/v0.62.0/LICENSE # Manually created patch for downstream crate metadata changes # * default to linking with libclang instead of using dlopen Patch: bindgen-cli-fix-metadata.diff BuildRequires: rust-packaging >= 23 %global _description %{expand: Automatically generates Rust FFI bindings to C and C++ libraries.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 # Apache-2.0 OR MIT # BSD-3-Clause # ISC # MIT # MIT OR Apache-2.0 # Unlicense OR MIT License: BSD-3-Clause AND Apache-2.0 AND ISC and MIT AND Unicode-DFS-2016 # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/bindgen %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 cp -pav %{SOURCE1} . %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license} > LICENSE.dependencies %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog