# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate icu_locid Name: rust-icu_locid Version: 1.5.0 Release: %autorelease Summary: API for managing Unicode Language and Locale Identifiers License: Unicode-3.0 URL: https://crates.io/crates/icu_locid Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Drop benchmark-only criterion dependency # * Do not depend on postcard; affected tests are patched out. # * Omit removed examples from Cargo.toml # * Restore the litemap dev-dependency, and particularly its testing feature, in # the normalized Cargo.toml; this could be fixed upstream by a change # analogous to “In zerovec, add the yoke version bound to the dev-dependency” # https://github.com/unicode-org/icu4x/pull/5537, but there is no point in # suggesting this upstream because the icu_locid crate has been refactored # away for the upcoming ICU4X 2.0 release. Patch: icu_locid-fix-metadata.diff # * Downstream-only: unconditionally skip compiling tests that would require # postcard. Patch10: icu_locid-1.5.0-no-postcard.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: tomcli %global _description %{expand: API for managing Unicode Language and Locale Identifiers.} %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 %package -n %{name}+zerovec-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+zerovec-devel %{_description} This package contains library source intended for building other packages which use the "zerovec" feature of the "%{crate}" crate. %files -n %{name}+zerovec-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 # Avoid a dependency on the internal icu_benchmark_macros crate rm -rv examples/ %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check # * All doc tests use icu::locid, which would require the circular (path-based) # dev-dependency on the icu crate. %cargo_test -- --lib %cargo_test -- --tests %endif %changelog %autochangelog