diff --git a/alsa-sys-fix-metadata.diff b/alsa-sys-fix-metadata.diff new file mode 100644 index 0000000..4c0dfd9 --- /dev/null +++ b/alsa-sys-fix-metadata.diff @@ -0,0 +1,8 @@ +--- alsa-sys-0.3.1/Cargo.toml 2020-12-22T20:30:47+00:00 ++++ alsa-sys-0.3.1/Cargo.toml 2023-07-25T05:54:41.960681+00:00 +@@ -27,3 +27,5 @@ + version = "0.2.65" + [build-dependencies.pkg-config] + version = "0.3" ++[lib] ++doctest = false diff --git a/rust-alsa-sys.spec b/rust-alsa-sys.spec index caa8f30..d33626d 100644 --- a/rust-alsa-sys.spec +++ b/rust-alsa-sys.spec @@ -1,24 +1,22 @@ -# Generated by rust2rpm 20 -# Deactivate tests because of missing function -# https://github.com/diwic/alsa-sys/issues/8 -%bcond_with check +# Generated by rust2rpm 24 +%bcond_without check %global debug_package %{nil} %global crate alsa-sys -Name: rust-%{crate} +Name: rust-alsa-sys Version: 0.3.1 Release: %autorelease Summary: FFI bindings for the ALSA project (Advanced Linux Sound Architecture) -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/alsa-sys Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * skip doctests: https://github.com/diwic/alsa-sys/commit/3a6d3b26bdc21ac74a0ba6e4a637decf20da0a39 +Patch: alsa-sys-fix-metadata.diff -ExclusiveArch: %{rust_arches} - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: FFI bindings for the ALSA project (Advanced Linux Sound Architecture).} @@ -28,7 +26,7 @@ FFI bindings for the ALSA project (Advanced Linux Sound Architecture).} %package devel Summary: %{summary} BuildArch: noarch -Requires: alsa-lib-devel +Requires: pkgconfig(alsa) %description devel %{_description} @@ -36,9 +34,9 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -50,7 +48,7 @@ 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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 @@ -58,7 +56,7 @@ use the "default" feature of the "%{crate}" crate. %generate_buildrequires %cargo_generate_buildrequires -echo "alsa-lib-devel" +echo 'pkgconfig(alsa)' %build %cargo_build diff --git a/rust2rpm.conf b/rust2rpm.conf new file mode 100644 index 0000000..579e2c7 --- /dev/null +++ b/rust2rpm.conf @@ -0,0 +1,5 @@ +[DEFAULT] +buildrequires = + pkgconfig(alsa) +lib.requires = + pkgconfig(alsa)