# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate icu_collator Name: rust-icu_collator Version: 2.1.1 Release: %autorelease Summary: API for comparing strings according to language-dependent conventions License: Unicode-3.0 URL: https://crates.io/crates/icu_collator Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Restore missing dev-dependencies, # https://github.com/unicode-org/icu4x/issues/7196: use .cargo_vcs_info.json # in the published crate to find the corresponding git commit, # git clone https://github.com/unicode-org/icu4x.git, cd utils/${crate}, # cargo publish --dry-run, # tar -xzf ../../target/package/${crate}-${version}.crate, and inspect # ${crate}-${version}/Cargo.toml to find the missing dev-dependencies. Note # that just looking at the crate’s Cargo.toml in the git checkout isn’t that # useful without the cargo publish --dry-run step because most or all of the # dev-dependencies are inherited from the workspace. Note also that we end up # omitting some of the dev-dependencies, as documented in the following # comments. # * Do not depend on criterion; it is needed only for benchmarks. # * Remove the dev-dependency on arraystring, which does not appear actively # maintained, and which we do not want to package, at the cost of one test. Patch: icu_collator-fix-metadata.diff # * Downstream-only: unconditionally skip compiling tests that would require the # arraystring crate. It does not appear actively maintained, and we do not # wish to package it solely for these tests. Patch10: icu_collator-2.1.1-no-arraystring-tests.patch BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: API for comparing strings according to language-dependent conventions.} %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}+compiled_data-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+compiled_data-devel %{_description} This package contains library source intended for building other packages which use the "compiled_data" feature of the "%{crate}" crate. %files -n %{name}+compiled_data-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+datagen-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+datagen-devel %{_description} This package contains library source intended for building other packages which use the "datagen" feature of the "%{crate}" crate. %files -n %{name}+datagen-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+latin1-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+latin1-devel %{_description} This package contains library source intended for building other packages which use the "latin1" feature of the "%{crate}" crate. %files -n %{name}+latin1-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 %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check # * Very many doctests have circular dependencies on the top-level icu crate, # enough that it would be very tedious to patch them all out. %cargo_test -- --lib %cargo_test -- --tests %endif %changelog %autochangelog