# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate icu_calendar Name: rust-icu_calendar Version: 2.1.1 Release: %autorelease Summary: Date APIs for Gregorian and non-Gregorian calendars License: Unicode-3.0 URL: https://crates.io/crates/icu_calendar Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Drop benchmark-only criterion dev-dependency # * Drop ureq dev-dependency: only for ignored tests that require network Patch: icu_calendar-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Date APIs for Gregorian and non-Gregorian calendars.} %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}+alloc-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+alloc-devel %{_description} This package contains library source intended for building other packages which use the "alloc" feature of the "%{crate}" crate. %files -n %{name}+alloc-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}+ixdtf-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+ixdtf-devel %{_description} This package contains library source intended for building other packages which use the "ixdtf" feature of the "%{crate}" crate. %files -n %{name}+ixdtf-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+logging-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+logging-devel %{_description} This package contains library source intended for building other packages which use the "logging" feature of the "%{crate}" crate. %files -n %{name}+logging-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}+unstable-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+unstable-devel %{_description} This package contains library source intended for building other packages which use the "unstable" feature of the "%{crate}" crate. %files -n %{name}+unstable-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 # The test suite contains some tests that are ignored because they require # network access, but ignored tests would still be compiled. To avoid an # otherwise-unnecessary dev-dependency on ureq, we do not compile these tests. sed -r -i \ 's@([[:blank:]]*)(#\[ignore.*\bnetwork\b.*)@\1#[cfg(false)]\n&@' \ src/cal/east_asian_traditional.rs %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. # * Test cal::east_asian_traditional_internal::simple::bounds is expected to # panic, but does not do so because we compile tests in release mode. %cargo_test -a -- --lib -- --exact --skip cal::east_asian_traditional_internal::simple::bounds %cargo_test -a -- --test arithmetic -- --exact --skip cal::east_asian_traditional_internal::simple::bounds %cargo_test -a -- --test exhaustive -- --exact --skip cal::east_asian_traditional_internal::simple::bounds %cargo_test -a -- --test extended_year -- --exact --skip cal::east_asian_traditional_internal::simple::bounds %cargo_test -a -- --test reference_year -- --exact --skip cal::east_asian_traditional_internal::simple::bounds %endif %changelog %autochangelog