diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | cargo_config | 5 | ||||
-rw-r--r-- | rust-bindgen.spec | 48 | ||||
-rw-r--r-- | sources | 2 |
4 files changed, 57 insertions, 0 deletions
@@ -0,0 +1,2 @@ +/v0.70.1.tar.gz +/vendor.tar.xz diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..a476f35 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor"
\ No newline at end of file diff --git a/rust-bindgen.spec b/rust-bindgen.spec new file mode 100644 index 0000000..667d22c --- /dev/null +++ b/rust-bindgen.spec @@ -0,0 +1,48 @@ +%global debug_package %{nil} +%global crate_name bindgen +%global rustflags -Clink-arg=-Wl,-z,relro,-z,now + +Name: rust-bindgen +Version: 0.70.1 +Release: 1 +Summary: Automatically generates Rust FFI bindings to C and C++ libraries +License: BSD-3-Clause +URL: https://crates.io/crates/bindgen +Source0: https://github.com/rust-lang/%{name}/archive/refs/tags/v%{version}.tar.gz +# Generated locally by running 'cargo vendor' +# then compress the vendor directory w/ 'Cargo.lock' +Source1: vendor.tar.xz +Source2: cargo_config +BuildRequires: cargo >= 1.70.0 +BuildRequires: rust >= 1.70.0 +Requires: gcc gcc-c++ clang + +%description +Automatically generates Rust FFI bindings to C and C++ libraries. + +%prep +%setup -q -T -b 0 -n %{name}-%{version} +%setup -q -D -T -a 1 -n %{name}-%{version} +mkdir -p .cargo +cp %{SOURCE2} .cargo/config + +%build +CARGO_FEATURE_VENDORED=1 RUSTFLAGS="-Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2" %{_bindir}/cargo build %{?_smp_mflags} --offline --release + +%install +install -D -d -m 0755 %{buildroot}%{_bindir} +install -Dm755 target/release/bindgen %{buildroot}%{_bindir}/ + +%files +%license LICENSE +%{_bindir}/bindgen + +%changelog +* Wed Oct 23 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 0.70.1-1 +- Upgrade to 0.70.1 + +* Tue Aug 08 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 0.66.1-1 +- Upgrade to 0.66.1 + +* Mon May 15 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 0.65.1-1 +- Init package @@ -0,0 +1,2 @@ +4f00ced86e359945f78276a2255aa1a7 v0.70.1.tar.gz +07633004c2058e7cebba12709d67d806 vendor.tar.xz |