Blob Blame History Raw
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}

# prevent executables from being installed
%global cargo_install_bin 0

%global crate cc

Name:           rust-cc
Version:        1.0.89
Release:        %autorelease
Summary:        Build-time dependency for Cargo build scripts to invoke the native C compiler

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/cc
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 26

%global _description %{expand:
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.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       /usr/bin/gcc
Requires:       /usr/bin/g++

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+default-devel %{_description}

This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+jobserver-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+jobserver-devel %{_description}

This package contains library source intended for building other packages which
use the "jobserver" feature of the "%{crate}" crate.

%files       -n %{name}+jobserver-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+libc-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+libc-devel %{_description}

This package contains library source intended for building other packages which
use the "libc" feature of the "%{crate}" crate.

%files       -n %{name}+libc-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+parallel-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+parallel-devel %{_description}

This package contains library source intended for building other packages which
use the "parallel" feature of the "%{crate}" crate.

%files       -n %{name}+parallel-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires
echo '/usr/bin/gcc'
echo '/usr/bin/g++'

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
%autochangelog