|
|
|
# Generated by rust2rpm 20
|
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
# work around RUSTFLAGS no longer being set in .cargo/config with rust2rpm 21
|
|
|
|
# https://pagure.io/fedora-rust/rust2rpm/issue/181
|
|
|
|
%global __cargo %(echo %__cargo | sed "s/debuginfo=2/debuginfo=1/")
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
%global crate cargo-c
|
|
|
|
%global upstream_version 0.9.7+cargo-0.59
|
|
|
|
|
|
|
|
Name: rust-%{crate}
|
|
|
|
Version: 0.9.7
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: Helper program to build and install c-like libraries
|
|
|
|
|
|
|
|
# Upstream license specification: MIT
|
|
|
|
License: MIT
|
|
|
|
URL: https://crates.io/crates/cargo-c
|
|
|
|
Source: %{crates_source %{crate} %{upstream_version}}
|
|
|
|
# Initial patched metadata
|
|
|
|
# * drop +cargo version suffix from crate version
|
|
|
|
# * remove vendored OpenSSL feature
|
|
|
|
Patch0: cargo-c-fix-metadata.diff
|
|
|
|
|
|
|
|
ExclusiveArch: %{rust_arches}
|
|
|
|
|
|
|
|
BuildRequires: rust-packaging
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
Helper program to build and install c-like libraries.}
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
%package -n %{crate}
|
|
|
|
Summary: %{summary}
|
|
|
|
# ASL 2.0
|
|
|
|
# ASL 2.0 or Boost
|
|
|
|
# ASL 2.0 or MIT
|
|
|
|
# MIT
|
|
|
|
# MIT or ASL 2.0
|
|
|
|
# MIT or ASL 2.0 or zlib
|
|
|
|
# MPLv2.0
|
|
|
|
# Unlicense or MIT
|
|
|
|
# zlib or ASL 2.0 or MIT
|
|
|
|
License: MIT and ASL 2.0 and MPLv2.0
|
|
|
|
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
|
|
|
|
%files -n %{crate}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/cargo-ctest
|
|
|
|
%{_bindir}/cargo-capi
|
|
|
|
%{_bindir}/cargo-cinstall
|
|
|
|
%{_bindir}/cargo-cbuild
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description devel %{_description}
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages which
|
|
|
|
use the "%{crate}" crate.
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
|
|
|
|
|
|
|
%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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{crate}-%{upstream_version} -p1
|
|
|
|
%cargo_prep
|
|
|
|
# drop debuginfo verbosity in an attempt to fix armv7hl OOM problems
|
|
|
|
sed -i "s/debuginfo=2/debuginfo=1/" .cargo/config
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
%cargo_generate_buildrequires
|
|
|
|
|
|
|
|
%build
|
|
|
|
%cargo_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cargo_install
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
%cargo_test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%autochangelog
|