From 36548ff1d939f1b3ed6af444fc40ed2c8fd84059 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 6 Jan 2025 11:07:07 +0000 Subject: automatic import of rust-bindgen --- .gitignore | 2 ++ cargo_config | 5 +++++ rust-bindgen.spec | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 2 ++ 4 files changed, 57 insertions(+) create mode 100644 cargo_config create mode 100644 rust-bindgen.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..c30c2e3 100644 --- a/.gitignore +++ b/.gitignore @@ -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 - 0.70.1-1 +- Upgrade to 0.70.1 + +* Tue Aug 08 2023 jchzhou - 0.66.1-1 +- Upgrade to 0.66.1 + +* Mon May 15 2023 jchzhou - 0.65.1-1 +- Init package diff --git a/sources b/sources new file mode 100644 index 0000000..9c8e2cf --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +4f00ced86e359945f78276a2255aa1a7 v0.70.1.tar.gz +07633004c2058e7cebba12709d67d806 vendor.tar.xz -- cgit v1.2.3