# Generated by rust2rpm 28 # * tests require ALSA audio hardware not available in RPM build environments %bcond check 0 %global debug_package %{nil} %global crate quad-alsa-sys Name: rust-quad-alsa-sys Version: 0.3.2 Release: %autorelease Summary: Fork of original alsa-sys, but with pkg-config replaced with -lasound License: MIT URL: https://crates.io/crates/quad-alsa-sys Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Drop the "regenerate_bindings" dev-only helper binary target: its # build.rs call references an undefined variable and a pkg_config # dependency this crate never declares, so it has never actually been # buildable. Make bindgen a mandatory build-dependency pinned to the # version packaged in Fedora (rust-bindgen 0.72.x) instead of an optional # 0.56 dependency that cannot be satisfied, and keep "use-bindgen" as a # noop feature for compatibility with existing dependents. Patch: quad-alsa-sys-fix-metadata.diff # * Always regenerate bindings with bindgen at build time instead of # shipping a stale pregenerated src/generated.rs, fix the ALSA header # include path so bindgen can find it, and update to the bindgen 0.72 API # (allowlist_* rename, CargoCallbacks::new()). Patch2: quad-alsa-sys-fix-bindgen-build.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: pkgconfig(alsa) %global _description %{expand: Fork of original alsa-sys, but with pkg-config replaced with -lasound.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(alsa) %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}/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-bindgen-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+use-bindgen-devel %{_description} This package contains library source intended for building other packages which use the "use-bindgen" feature of the "%{crate}" crate. %files -n %{name}+use-bindgen-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 rm -f regenerate_bindings.rs regenerate_bindings.sh rm -f src/generated.rs %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog