You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
3.1 KiB
114 lines
3.1 KiB
# Generated by rust2rpm 24
|
|
%bcond_without check
|
|
|
|
# reduce debuginfo verbosity to work around OOM problems on 32-bit arches
|
|
%global rustflags_debuginfo 1
|
|
|
|
%global crate cargo-c
|
|
%global upstream_version 0.9.19+cargo-0.70
|
|
|
|
Name: rust-cargo-c
|
|
Version: 0.9.19
|
|
Release: %autorelease
|
|
Summary: Helper program to build and install c-like libraries
|
|
|
|
License: MIT
|
|
URL: https://crates.io/crates/cargo-c
|
|
Source0: %{crates_source %{crate} %{upstream_version}}
|
|
Source1: macros.cargo-c
|
|
# Automatically generated patch to strip foreign dependencies
|
|
Patch: cargo-c-fix-metadata-auto.diff
|
|
# Manually created patch for downstream crate metadata changes
|
|
# * drop +cargo version suffix from crate version
|
|
# * remove vendored OpenSSL feature
|
|
Patch: cargo-c-fix-metadata.diff
|
|
|
|
BuildRequires: rust-packaging >= 23
|
|
|
|
%global _description %{expand:
|
|
Helper program to build and install c-like libraries.}
|
|
|
|
%description %{_description}
|
|
|
|
%package -n %{crate}
|
|
Summary: %{summary}
|
|
# (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
|
|
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
|
|
# Apache-2.0
|
|
# Apache-2.0 OR BSL-1.0
|
|
# Apache-2.0 OR MIT
|
|
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
|
|
# BSD-3-Clause
|
|
# MIT
|
|
# MIT OR Apache-2.0
|
|
# MIT OR Apache-2.0 OR BSD-1-Clause
|
|
# MIT OR Apache-2.0 OR Zlib
|
|
# MPL-2.0
|
|
# MPL-2.0+
|
|
# Unlicense OR MIT
|
|
# Zlib OR Apache-2.0 OR MIT
|
|
License: Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT AND MPL-2.0 AND MPL-2.0+ 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 (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
|
|
# LICENSE.dependencies contains a full license breakdown
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
%files -n %{crate}
|
|
%license LICENSE
|
|
%license LICENSE.dependencies
|
|
%doc README.md
|
|
%{_bindir}/cargo-capi
|
|
%{_bindir}/cargo-cbuild
|
|
%{_bindir}/cargo-cinstall
|
|
%{_bindir}/cargo-ctest
|
|
%{_rpmmacrodir}/macros.cargo-c
|
|
|
|
%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 %{crate_instdir}/LICENSE
|
|
%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
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{upstream_version} -p1
|
|
%cargo_prep
|
|
|
|
%generate_buildrequires
|
|
%cargo_generate_buildrequires
|
|
|
|
%build
|
|
%cargo_build
|
|
%cargo_license_summary
|
|
%{cargo_license} > LICENSE.dependencies
|
|
|
|
%install
|
|
%cargo_install
|
|
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} %{SOURCE1}
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|
|
%autochangelog
|