# Generated by rust2rpm %bcond_without check %global debug_package %{nil} %global crate cc Name: rust-%{crate} Version: 1.0.3 Release: 1%{?dist} Summary: Build-time dependency for Cargo build scripts to invoke the native C compiler License: MIT or ASL 2.0 URL: https://crates.io/crates/cc Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump rayon to 0.9, https://github.com/alexcrichton/cc-rs/pull/269 Patch0: cc-1.0.3-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(rayon) >= 0.9.0 with crate(rayon) < 0.10.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) %endif BuildRequires: %{_bindir}/gcc BuildRequires: %{_bindir}/g++ %description %{summary}. %package devel Summary: %{summary} Requires: %{_bindir}/gcc Requires: %{_bindir}/g++ BuildArch: noarch %description devel A build-time dependency for Cargo build scripts to assist in invoking the native C compiler to compile native C code into a static archive to be linked into Rust code. This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %build %cargo_build %install %cargo_install %if %{with check} %check # Tests can't be really run in parallel %cargo_test -- --test-threads=1 %endif %files devel %license LICENSE-MIT LICENSE-APACHE %doc README.md %{cargo_registry}/%{crate}-%{version}/ %exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml # https://github.com/alexcrichton/cc-rs/issues/139 %exclude %{_bindir}/{gcc-shim} %changelog * Thu Nov 16 2017 Igor Gnatenko - 1.0.3-1 - Initial package