# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate dasp_sample Name: rust-dasp_sample Version: 0.11.0 Release: %autorelease Summary: Abstraction for audio PCM DSP samples, along with useful conversions and operations License: MIT OR Apache-2.0 URL: https://crates.io/crates/dasp_sample Source: %{crates_source} # License files are not bundled in the crate; tracked upstream: # https://github.com/RustAudio/dasp/issues/187 Source1: https://raw.githubusercontent.com/RustAudio/dasp/master/LICENSE-MIT#/dasp_sample-LICENSE-MIT Source2: https://raw.githubusercontent.com/RustAudio/dasp/master/LICENSE-APACHE#/dasp_sample-LICENSE-APACHE # Manually created patch for downstream crate metadata changes Patch: dasp_sample-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: An abstraction for audio PCM DSP samples, along with useful conversions and operations.} %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-MIT %license %{crate_instdir}/LICENSE-APACHE %{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}+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 %prep %autosetup -n %{crate}-%{version} -p1 cp %{SOURCE1} LICENSE-MIT cp %{SOURCE2} LICENSE-APACHE %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install install -m 0644 LICENSE-MIT %{buildroot}/%{crate_instdir}/ install -m 0644 LICENSE-APACHE %{buildroot}/%{crate_instdir}/ %if %{with check} %check %cargo_test %endif %changelog %autochangelog