# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate derivative Name: rust-derivative Version: 2.2.0 Release: %autorelease Summary: Set of alternative derive attributes for Rust # Upstream license specification: MIT/Apache-2.0 License: MIT OR Apache-2.0 URL: https://crates.io/crates/derivative Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * relax broken version restriction on trybuild dev-dependency Patch: derivative-fix-metadata.diff BuildRequires: rust-packaging >= 21 %global _description %{expand: A set of alternative `derive` attributes for Rust.} %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-APACHE %license %{crate_instdir}/LICENSE-MIT %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/CONTRIBUTING.md %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}+use_core-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+use_core-devel %{_description} This package contains library source intended for building other packages which use the "use_core" feature of the "%{crate}" crate. %files -n %{name}+use_core-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 # * remove stray executable bits from sources chmod -x tests/*.rs # * drop a test that fails with Rust 1.66+: # https://github.com/mcarton/rust-derivative/issues/106 rm tests/derive-debug-generics.rs %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog