# Generated by rust2rpm %bcond_without check %global crate cbindgen Name: rust-%{crate} Version: 0.3.3 Release: 1%{?dist} Summary: Tool for generating C bindings to Rust code License: MPLv2.0 URL: https://crates.io/crates/cbindgen Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(clap) >= 2.0.0 with crate(clap) < 3.0.0) BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) BuildRequires: ((crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) with crate(serde/derive)) BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) BuildRequires: ((crate(syn) >= 0.11.0 with crate(syn) < 0.12.0) with crate(syn/full)) BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) BuildRequires: (crate(toml) >= 0.4.0 with crate(toml) < 0.5.0) %description %{summary}. %package -n %{crate} Summary: %{summary} %description -n %{crate} A tool for generating C bindings to Rust code. %package devel Summary: %{summary} BuildArch: noarch %description devel A tool for generating C bindings to Rust code. This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %files -n %{crate} %license LICENSE %{_bindir}/cbindgen %files devel %license LICENSE %doc ARCHITECTURE.md CONTRIBUTING.md README.md %{cargo_registry}/%{crate}-%{version}/ %changelog * Mon Jan 01 2018 Igor Gnatenko - 0.3.3-1 - Initial package