summaryrefslogtreecommitdiff
path: root/rust-bindgen.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-01-06 11:07:07 +0000
committerCoprDistGit <infra@openeuler.org>2025-01-06 11:07:07 +0000
commit36548ff1d939f1b3ed6af444fc40ed2c8fd84059 (patch)
tree9cb4c71d1a9ab97cd85579ca67efeabe4583e897 /rust-bindgen.spec
parent7faf6f14f8243114f7b664fb707f4adfee441117 (diff)
automatic import of rust-bindgenopeneuler24.03_LTS
Diffstat (limited to 'rust-bindgen.spec')
-rw-r--r--rust-bindgen.spec48
1 files changed, 48 insertions, 0 deletions
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