# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate zerovec Name: rust-zerovec Version: 0.10.4 Release: %autorelease Summary: Zero-copy vector backed by a byte array License: Unicode-3.0 URL: https://crates.io/crates/zerovec Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Do not depend on criterion; it is needed only for benchmarks. # * Drop the zv_serde example, which would require postcard. # * Restore the yoke dev-dependency, and particularly its derive feature, in the # normalized Cargo.toml; this would be fixed upstream by “In zerovec, add the # yoke version bound to the dev-dependency” # https://github.com/unicode-org/icu4x/pull/5537 Patch: zerovec-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: tomcli %global _description %{expand: Zero-copy vector backed by a byte array.} %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}+derive-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+derive-devel %{_description} This package contains library source intended for building other packages which use the "derive" feature of the "%{crate}" crate. %files -n %{name}+derive-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+hashmap-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+hashmap-devel %{_description} This package contains library source intended for building other packages which use the "hashmap" feature of the "%{crate}" crate. %files -n %{name}+hashmap-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}+yoke-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+yoke-devel %{_description} This package contains library source intended for building other packages which use the "yoke" feature of the "%{crate}" crate. %files -n %{name}+yoke-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep # Do not depend on getrandom; nothing that needs it is included in the crate. tomcli set Cargo.toml del dev-dependencies.getrandom # Do not depend on postcard; it is needed only for benchmarks, and for one # example, which we also remove. tomcli set Cargo.toml del dev-dependencies.postcard rm examples/zv_serde.rs %generate_buildrequires %cargo_generate_buildrequires -f databake,derive,serde,yoke %build %cargo_build -f databake,derive,serde,yoke %install %cargo_install -f databake,derive,serde,yoke %if %{with check} %check # * Tests using databake may fail due to trivial differences in the string # representations of generated code, such as trailing commas without semantic # significance. # * ule::tuple::test_pairule_validate fails in release mode %cargo_test -f databake,derive,serde,yoke -- -- --exact --skip map2d::databake::test_baked_borrowed_map --skip map2d::databake::test_baked_map --skip map::databake::test_baked_borrowed_map --skip map::databake::test_baked_map --skip yoke_impls::test::bake_VarZeroSlice --skip yoke_impls::test::bake_ZeroMap --skip yoke_impls::test::bake_ZeroMap2d --skip yoke_impls::test::bake_ZeroMap2dBorrowed --skip yoke_impls::test::bake_ZeroMapBorrowed --skip yoke_impls::test::bake_ZeroMapWithULE --skip ule::tuple::test_pairule_validate %endif %changelog %autochangelog