2024-05-04 00:23:59 +02:00
|
|
|
#
|
|
|
|
# spec file
|
|
|
|
#
|
2024-08-23 17:00:01 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2024-05-04 00:23:59 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
# Use hardening ldflags.
|
|
|
|
%global crate_name cbindgen
|
|
|
|
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
|
|
|
Name: rust-%{crate_name}
|
2024-08-23 17:00:01 +02:00
|
|
|
Version: 0.26.0+git0
|
2024-05-04 00:23:59 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A tool for generating C bindings from Rust code
|
|
|
|
License: MPL-2.0
|
|
|
|
Group: Development/Languages/Rust
|
|
|
|
URL: https://crates.io/crates/cbindgen
|
2024-08-23 17:00:01 +02:00
|
|
|
Source0: %{crate_name}-%{version}.tar.zst
|
|
|
|
Source1: vendor.tar.zst
|
2024-05-04 00:23:59 +02:00
|
|
|
Source2: cargo_config
|
|
|
|
Source99: UPDATING.md
|
2024-08-23 17:00:01 +02:00
|
|
|
BuildRequires: cargo >= 1.70.0
|
|
|
|
BuildRequires: cargo-packaging
|
|
|
|
BuildRequires: rust >= 1.70.0
|
2024-05-04 00:23:59 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
A tool for generating C bindings from Rust code.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -T -b 0 -n %{crate_name}-%{version}
|
|
|
|
%setup -q -D -T -a 1 -n %{crate_name}-%{version}
|
2024-08-23 17:00:01 +02:00
|
|
|
install -D -m 644 %{SOURCE2} .cargo/config
|
2024-05-04 00:23:59 +02:00
|
|
|
|
|
|
|
%build
|
2024-08-23 17:00:01 +02:00
|
|
|
%{cargo_build}
|
2024-05-04 00:23:59 +02:00
|
|
|
|
|
|
|
%install
|
2024-08-23 17:00:01 +02:00
|
|
|
install -D -d -m 0755 %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 %{_builddir}/%{crate_name}-%{version}/target/release/%{crate_name} %{buildroot}%{_bindir}/%{crate_name}
|
2024-05-04 00:23:59 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
2024-08-23 17:00:01 +02:00
|
|
|
%{_bindir}/%{crate_name}
|
2024-05-04 00:23:59 +02:00
|
|
|
|
|
|
|
%changelog
|