# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate icu_plurals Name: rust-icu_plurals Version: 2.1.1 Release: %autorelease Summary: Unicode Plural Rules categorizer for numeric input License: Unicode-3.0 URL: https://crates.io/crates/icu_plurals Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Drop benchmark-only criterion dev-dependency Patch: icu_plurals-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: tomcli %global _description %{expand: Unicode Plural Rules categorizer for numeric input.} %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}+experimental-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+experimental-devel %{_description} This package contains library source intended for building other packages which use the "experimental" feature of the "%{crate}" crate. %files -n %{name}+experimental-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+icu_normalizer_data-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+icu_normalizer_data-devel %{_description} This package contains library source intended for building other packages which use the "icu_normalizer_data" feature of the "%{crate}" crate. %files -n %{name}+icu_normalizer_data-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 # Restore dev-dependency icu_locale_core, which is path-based and was therefore # removed by Cargo.toml normalization. We script this rather than using a patch # because the version bound should be based on the ICU4X version, and we don’t # want to constantly update the patch. tomcli set Cargo.toml str dev-dependencies.icu_locale_core.version '~%{version}' %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -a %build %cargo_build -a %install %cargo_install -a %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 -a -- --lib %cargo_test -a -- --test plurals %cargo_test -a -- --test operands %cargo_test -a -- --test rules %endif %changelog %autochangelog