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.
143 lines
4.1 KiB
143 lines
4.1 KiB
3 months ago
|
# Generated by rust2rpm 27
|
||
|
%bcond check 1
|
||
|
%global debug_package %{nil}
|
||
|
|
||
|
%global crate icu_collections
|
||
|
|
||
|
Name: rust-icu_collections
|
||
|
Version: 1.5.0
|
||
|
Release: %autorelease
|
||
|
Summary: Collection of API for use in ICU libraries
|
||
|
|
||
|
License: Unicode-3.0
|
||
|
URL: https://crates.io/crates/icu_collections
|
||
|
Source: %{crates_source}
|
||
|
# Manually created patch for downstream crate metadata changes
|
||
|
# * Drop benchmark-only criterion dependency
|
||
|
Patch: icu_collections-fix-metadata.diff
|
||
|
# * Downstream-only: unconditionally skip compiling tests that would require
|
||
|
# postcard.
|
||
|
Patch10: icu_collections-1.5.0-no-postcard.patch
|
||
|
# * Downstream-only: unconditionally skip compiling tests that would require the
|
||
|
# circular (path-based) dev-dependency on the icu crate.
|
||
|
Patch11: icu_collections-1.5.0-no-icu-dev-dependency.patch
|
||
|
|
||
|
BuildRequires: cargo-rpm-macros >= 24
|
||
|
BuildRequires: tomcli
|
||
|
|
||
|
%global _description %{expand:
|
||
|
Collection of API for use in ICU libraries.}
|
||
|
|
||
|
%description %{_description}
|
||
|
|
||
|
%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
|
||
|
|
||
|
%package -n %{name}+bench-devel
|
||
|
Summary: %{summary}
|
||
|
BuildArch: noarch
|
||
|
|
||
|
%description -n %{name}+bench-devel %{_description}
|
||
|
|
||
|
This package contains library source intended for building other packages which
|
||
|
use the "bench" feature of the "%{crate}" crate.
|
||
|
|
||
|
%files -n %{name}+bench-devel
|
||
|
%ghost %{crate_instdir}/Cargo.toml
|
||
|
|
||
|
%package -n %{name}+databake-devel
|
||
|
Summary: %{summary}
|
||
|
BuildArch: noarch
|
||
|
|
||
|
%description -n %{name}+databake-devel %{_description}
|
||
|
|
||
|
This package contains library source intended for building other packages which
|
||
|
use the "databake" feature of the "%{crate}" crate.
|
||
|
|
||
|
%files -n %{name}+databake-devel
|
||
|
%ghost %{crate_instdir}/Cargo.toml
|
||
|
|
||
|
%package -n %{name}+serde-devel
|
||
|
Summary: %{summary}
|
||
|
BuildArch: noarch
|
||
|
|
||
|
%description -n %{name}+serde-devel %{_description}
|
||
|
|
||
|
This package contains library source intended for building other packages which
|
||
|
use the "serde" feature of the "%{crate}" crate.
|
||
|
|
||
|
%files -n %{name}+serde-devel
|
||
|
%ghost %{crate_instdir}/Cargo.toml
|
||
|
|
||
|
%package -n %{name}+std-devel
|
||
|
Summary: %{summary}
|
||
|
BuildArch: noarch
|
||
|
|
||
|
%description -n %{name}+std-devel %{_description}
|
||
|
|
||
|
This package contains library source intended for building other packages which
|
||
|
use the "std" feature of the "%{crate}" crate.
|
||
|
|
||
|
%files -n %{name}+std-devel
|
||
|
%ghost %{crate_instdir}/Cargo.toml
|
||
|
|
||
|
%prep
|
||
|
%autosetup -n %{crate}-%{version} -p1
|
||
|
# Do not depend on postcard; it is needed only for one (skipped) test.
|
||
|
tomcli set Cargo.toml del dev-dependencies.postcard
|
||
|
# Avoid a dependency on the internal icu_benchmark_macros crate
|
||
|
rm -rv examples/
|
||
|
%cargo_prep
|
||
|
|
||
|
%generate_buildrequires
|
||
|
%cargo_generate_buildrequires -f databake,serde
|
||
|
|
||
|
%build
|
||
|
%cargo_build -f databake,serde
|
||
|
|
||
|
%install
|
||
|
%cargo_install -f databake,serde
|
||
|
|
||
|
%if %{with check}
|
||
|
%check
|
||
|
# * All doc tests use icu::collections, which would require the circular
|
||
|
# (path-based) dev-dependency on the icu crate.
|
||
|
# * Tests using databake may fail due to trivial differences in the string
|
||
|
# representations of generated code, such as trailing commas without semantic
|
||
|
# significance.
|
||
|
%{cargo_test -f databake,serde -- --lib -- --exact %{shrink:
|
||
|
--skip codepointinvlist::cpinvlist::tests::databake
|
||
|
--skip codepointtrie::cptrie::tests::databake
|
||
|
}}
|
||
|
%{cargo_test -f databake,serde -- --tests -- --exact %{shrink:
|
||
|
--skip codepointinvlist::cpinvlist::tests::databake
|
||
|
--skip codepointtrie::cptrie::tests::databake
|
||
|
}}
|
||
|
%endif
|
||
|
|
||
|
%changelog
|
||
|
%autochangelog
|