blob: 667d22cb229178c03ec826727484b05f86a4198e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
|