89 lines
2.1 KiB
RPMSpec
89 lines
2.1 KiB
RPMSpec
%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.2
|
|
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
|