# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate salsa Name: rust-salsa Version: 0.26.1 Release: %autorelease Summary: Generic framework for on-demand, incrementalized computation License: Apache-2.0 OR MIT URL: https://crates.io/crates/salsa Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Remove benchmark-only dev-dependency on codspeed-criterion-compat # * Remove the dev-dependency on an old version of notify-debouncer-mini, and # the lazy-input example that required it # * Exclude the book from published crates: # https://github.com/salsa-rs/salsa/pull/1089 Patch: salsa-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: dos2unix %global _description %{expand: A generic framework for on-demand, incrementalized computation (experimental).} %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}/FAQ.md %doc %{crate_instdir}/README.md %doc %{crate_instdir}/RELEASES.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}+accumulator-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+accumulator-devel %{_description} This package contains library source intended for building other packages which use the "accumulator" feature of the "%{crate}" crate. %files -n %{name}+accumulator-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+compact_str-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+compact_str-devel %{_description} This package contains library source intended for building other packages which use the "compact_str" feature of the "%{crate}" crate. %files -n %{name}+compact_str-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+inventory-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+inventory-devel %{_description} This package contains library source intended for building other packages which use the "inventory" feature of the "%{crate}" crate. %files -n %{name}+inventory-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+macros-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+macros-devel %{_description} This package contains library source intended for building other packages which use the "macros" feature of the "%{crate}" crate. %files -n %{name}+macros-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+ordermap-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+ordermap-devel %{_description} This package contains library source intended for building other packages which use the "ordermap" feature of the "%{crate}" crate. %files -n %{name}+ordermap-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+persistence-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+persistence-devel %{_description} This package contains library source intended for building other packages which use the "persistence" feature of the "%{crate}" crate. %files -n %{name}+persistence-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rayon-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+rayon-devel %{_description} This package contains library source intended for building other packages which use the "rayon" feature of the "%{crate}" crate. %files -n %{name}+rayon-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+salsa_unstable-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+salsa_unstable-devel %{_description} This package contains library source intended for building other packages which use the "salsa_unstable" feature of the "%{crate}" crate. %files -n %{name}+salsa_unstable-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 # Fix CRLF line endings in Rust sources", find . -type f -name '*.rs' -exec dos2unix --keepdate '{}' '+' # Prove that the bundled mermaid in the book is not used. # See https://github.com/salsa-rs/salsa/pull/1089. # The license of mermaid is MIT, and the license of dependencies bundled in # mermaid.min.js appear to be MIT as well, so there appears to be no reason to # try to filter these sources out of the crate and keep them from appearing in # the source RPM. rm book/mermaid-init.js book/mermaid.css book/mermaid.min.js %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog