diff options
Diffstat (limited to 'rust-bindgen.spec')
-rw-r--r-- | rust-bindgen.spec | 48 |
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 |