# Generated by rust2rpm 28 %bcond check 1 %global crate cargo-cyclonedx Name: rust-cargo-cyclonedx Version: 0.5.9 Release: %autorelease Summary: CycloneDX Software Bill of Materials (SBOM) for Rust Crates License: Apache-2.0 URL: https://crates.io/crates/cargo-cyclonedx Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Update a few cargo-cyclonedx dependencies across SemVer boundaries: # - Update cargo-lock dependency from v10 to v11 # - Update env_logger dependency from v0.10 to v0.11 # - Update validator dependency from v0.19 to v0.20 # https://github.com/CycloneDX/cyclonedx-rust-cargo/pull/862 Patch: cargo-cyclonedx-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: CycloneDX Software Bill of Materials (SBOM) for Rust Crates.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND Apache-2.0 AND CC0-1.0 # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 # Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # MIT-0 # Unicode-3.0 # Unlicense OR MIT License: %{shrink: Apache-2.0 AND CC0-1.0 AND MIT AND MIT-0 AND Unicode-3.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT) } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc CHANGELOG.md %doc README.md %{_bindir}/cargo-cyclonedx %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}/CHANGELOG.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 %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install %if %{with check} %check # * A few tests require fixtures that are not included in published crates %{cargo_test -- -- --exact %{shrink: --skip tests::parse_toml_only_normal --skip tests::parse_toml_with_excluded }} %endif %changelog %autochangelog