From 5b766fa03321922245b002f016da9fd89b774a5b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 2 Jan 2018 19:20:49 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + rust-cbindgen.spec | 72 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 74 insertions(+) create mode 100644 .gitignore create mode 100644 rust-cbindgen.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a33c01 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/cbindgen-0.3.3.crate diff --git a/rust-cbindgen.spec b/rust-cbindgen.spec new file mode 100644 index 0000000..641c7c1 --- /dev/null +++ b/rust-cbindgen.spec @@ -0,0 +1,72 @@ +# 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 diff --git a/sources b/sources new file mode 100644 index 0000000..ceed428 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cbindgen-0.3.3.crate) = c6edf303dbdbf2d6a2917c02c684836d48d886617b55c71d140948d8f59996e4d3195ed1292d4216cdd564d27033b7ef10deb9b7f6bc870ba02e93a77a7ffe52