Initial commit on c10s

Resolves: RHEL-91175
This commit is contained in:
Josh Stone 2025-07-09 14:31:13 -07:00
parent 20bc9e872f
commit 4183493db7
3 changed files with 92 additions and 0 deletions

2
.gitignore vendored
View File

@ -0,0 +1,2 @@
/cbindgen-0.29.0.crate
/cbindgen-0.29.0-vendor.tar.xz

88
cbindgen.spec Normal file
View File

@ -0,0 +1,88 @@
%bcond check 1
# prevent library files from being installed
%global cargo_install_lib 0
%global crate cbindgen
# This is forked from Fedora's rust-cbindgen, shipping only the command-line
# binary, not any of the library -devel packages. We've renamed the source
# so Fedora EPEL can continue shipping its devel packages without conflict.
Name: cbindgen
Version: 0.29.0
Release: %autorelease
Summary: Tool for generating C bindings to Rust code
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# MIT
# MIT OR Apache-2.0
# MPL-2.0
# Unlicense OR MIT
License: %{shrink:
MPL-2.0 AND
MIT AND
Unicode-DFS-2016 AND
(Apache-2.0 OR BSL-1.0) AND
(Apache-2.0 OR MIT) AND
(Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND
(Unlicense OR MIT)
}
# LICENSE.dependencies contains a full license breakdown
URL: https://crates.io/crates/cbindgen
Source: %{crates_source}
# vendor tarball is generated by running:
# tar xf cbindgen-%%{version}.crate
# pushd cbindgen-%%{version}
# cargo vendor-filterer --versioned-dirs \
# --platform={aarch64,i686,powerpc64le,s390x,x86_64}-unknown-linux-gnu
# tar --sort=name -Jcvf ../cbindgen-%%{version}-vendor.tar.xz vendor/
# popd
Source1: cbindgen-%{version}-vendor.tar.xz
BuildRequires: rust-toolset
%if %{with check}
BuildRequires: /usr/bin/cython
BuildRequires: /usr/bin/gcc
BuildRequires: /usr/bin/g++
%endif
%global _description %{expand:
A tool for generating C bindings to Rust code.}
%description %{_description}
%files
%license LICENSE
%license LICENSE.dependencies
%license cargo-vendor.txt
%doc README.md
%doc contributing.md
%doc docs.md
%doc internals.md
%{_bindir}/cbindgen
%prep
%autosetup -n %{crate}-%{version} -p1 -a1
%cargo_prep -v vendor
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%{cargo_vendor_manifest}
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (cbindgen-0.29.0.crate) = fa2816881b376e3cc9ce61f9ee982438b38224fdd7225a41131e2500395d75e09b596840fb75f8ffcc04d7a9f90be02c2256918fe33f377660c1d78a3f89a1ac
SHA512 (cbindgen-0.29.0-vendor.tar.xz) = 57e5a08c8db9afab29daeba172e2a80dc694ee6de5a4752b919cda65720c236dd789ce77bb022bf74726420eeb8018ccfe67de9e408a38775ae1c3c690fac247