# Generated by rust2rpm
%bcond_without check
%global crate cbindgen
Name: rust-%{crate}
Version: 0.6.3
Release: 2%{?dist}
Summary: Tool for generating C bindings to Rust code
# Upstream license specification: MPL-2.0
License: MPLv2.0
URL: https://crates.io/crates/cbindgen
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump pinned serde, https://github.com/eqrion/cbindgen/pull/207
Patch0: cbindgen-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(clap) >= 2.0.0 with crate(clap) < 3.0.0)
BuildRequires: (crate(log) >= 0.4.0 with crate(log) < 0.5.0)
BuildRequires: ((crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) with crate(serde/derive))
BuildRequires: crate(serde_derive) = 1.0.58
BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0)
BuildRequires: ((crate(syn) >= 0.14.0 with crate(syn) < 0.15.0) with crate(syn/clone-impls) with crate(syn/derive) with crate(syn/extra-traits) with crate(syn/full) with crate(syn/parsing) with crate(syn/printing))
BuildRequires: (crate(tempfile) >= 3.0.0 with crate(tempfile) < 4.0.0)
BuildRequires: (crate(toml) >= 0.4.0 with crate(toml) < 0.5.0)
%description
%{summary}.
%package -n %{crate}
Summary: %{summary}
%description -n %{crate}
%{summary}.
%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
%doc README.md
%{_bindir}/cbindgen
%files devel
%license LICENSE
%doc ARCHITECTURE.md CONTRIBUTING.md README.md
%{cargo_registry}/%{crate}-%{version}/
%changelog
* Sat Sep 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-2
- Add cbindgen back
* Wed Sep 05 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-1
- Update to 0.6.3
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.1-3
- Drop cbindgen executable
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.1-2
- Rebuild to trigger tests
* Thu Jul 26 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.1-1
- Update to 0.6.1
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Feb 01 2018 Josh Stone <jistone@redhat.com> - 0.4.3-1
- Update to 0.4.3
* Tue Jan 30 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.2-1
- Update to 0.4.2
* Mon Jan 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.0-2
- Rebuild for rust-packaging v5
* Fri Jan 05 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.0-1
- Update to 0.4.0
* Mon Jan 01 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.3-1
- Initial package