# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate cyclonedx-bom-macros Name: rust-cyclonedx-bom-macros Version: 0.1.0 Release: %autorelease Summary: Procedural macros used internally by the cyclonedx-bom crate License: Apache-2.0 URL: https://crates.io/crates/cyclonedx-bom-macros Source: %{crates_source} # * Fix missing LICENSE files in published crates: # https://github.com/CycloneDX/cyclonedx-rust-cargo/pull/809 Source10: https://github.com/CycloneDX/cyclonedx-rust-cargo/raw/649dcba64d9e0e34e233450e0f1e7b96ea95d02d/LICENSE BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Procedural macros used internally by the `cyclonedx-bom` crate.} %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 %{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 %prep %autosetup -n %{crate}-%{version} -p1 cp -p '%{SOURCE10}' . %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check # A snapshot-based test fails due to trivial differences in compiler # diagnostics. We submitted “Update a snapshot in cyclonedx-bom-macros for Rust # 1.91”, https://github.com/CycloneDX/cyclonedx-rust-cargo/pull/810, to update # the snapshot for Rust 1.91, but the test still fails in the RPM build # environment due to trivial whitespace differences even if that PR is applied # as a patch. Setting the following environment variable, designed to update # snapshots tracked in VCS, means snapshot discrepancies will be reported to # the console but not treated as failures. export TRYBUILD=overwrite %cargo_test %endif %changelog %autochangelog