The package rpms/rust-cpal.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-cpal.git/commit/?id=ef45d86a....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit ef45d86ab8937f00e88d22d7324650a996fd1234
Author: Rémi Lauzier <remilauzier(a)protonmail.com>
Date: Wed Jul 7 23:36:27 2021 -0400
Initial import
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5d8aa8a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/cpal-0.13.3.crate
diff --git a/cpal-fix-metadata.diff b/cpal-fix-metadata.diff
new file mode 100644
index 0000000..9b9bf88
--- /dev/null
+++ b/cpal-fix-metadata.diff
@@ -0,0 +1,70 @@
+--- cpal-0.13.3/Cargo.toml 1970-01-01T00:00:00+00:00
++++ cpal-0.13.3/Cargo.toml 2021-06-25T20:14:42.431600+00:00
+@@ -51,18 +51,6 @@
+ [dev-dependencies.ringbuf]
+ version = "0.2"
+
+-[features]
+-asio = ["asio-sys", "num-traits"]
+-[target."cfg(all(target_arch = \"wasm32\", target_os =
\"unknown\"))".dependencies.js-sys]
+-version = "0.3.35"
+-
+-[target."cfg(all(target_arch = \"wasm32\", target_os =
\"unknown\"))".dependencies.wasm-bindgen]
+-version = "0.2.58"
+-optional = true
+-
+-[target."cfg(all(target_arch = \"wasm32\", target_os =
\"unknown\"))".dependencies.web-sys]
+-version = "0.3.35"
+-features = ["AudioContext", "AudioContextOptions",
"AudioBuffer", "AudioBufferSourceNode", "AudioNode",
"AudioDestinationNode", "Window", "AudioContextState"]
+ [target."cfg(any(target_os = \"linux\", target_os =
\"dragonfly\", target_os = \"freebsd\"))".dependencies.alsa]
+ version = "0.5"
+
+@@ -78,48 +66,3 @@
+
+ [target."cfg(any(target_os = \"linux\", target_os =
\"dragonfly\", target_os =
\"freebsd\"))".dependencies.parking_lot]
+ version = "0.11"
+-[target."cfg(any(target_os = \"macos\", target_os =
\"ios\"))".dependencies.core-foundation-sys]
+-version = "0.6.2"
+-
+-[target."cfg(any(target_os = \"macos\", target_os =
\"ios\"))".dependencies.mach]
+-version = "0.3"
+-[target."cfg(target_os = \"android\")".dependencies.jni]
+-version = "0.18"
+-
+-[target."cfg(target_os = \"android\")".dependencies.ndk]
+-version = "0.3"
+-
+-[target."cfg(target_os = \"android\")".dependencies.ndk-glue]
+-version = "0.3"
+-
+-[target."cfg(target_os = \"android\")".dependencies.oboe]
+-version = "0.4.0"
+-features = ["java-interface"]
+-[target."cfg(target_os = \"emscripten\")".dependencies.stdweb]
+-version = "0.1.3"
+-default-features = false
+-[target."cfg(target_os = \"ios\")".dependencies.coreaudio-rs]
+-version = "0.10.0"
+-features = ["audio_unit", "core_audio", "audio_toolbox"]
+-default-features = false
+-[target."cfg(target_os = \"macos\")".dependencies.coreaudio-rs]
+-version = "0.10.0"
+-features = ["audio_unit", "core_audio"]
+-default-features = false
+-[target."cfg(target_os = \"windows\")".dependencies.asio-sys]
+-version = "0.2"
+-optional = true
+-
+-[target."cfg(target_os = \"windows\")".dependencies.lazy_static]
+-version = "1.4"
+-
+-[target."cfg(target_os = \"windows\")".dependencies.num-traits]
+-version = "0.2.6"
+-optional = true
+-
+-[target."cfg(target_os = \"windows\")".dependencies.parking_lot]
+-version = "0.11"
+-
+-[target."cfg(target_os = \"windows\")".dependencies.winapi]
+-version = "0.3"
+-features = ["audiosessiontypes", "audioclient",
"coml2api", "combaseapi", "debug", "devpkey",
"handleapi", "ksmedia", "mmdeviceapi", "objbase",
"profileapi", "std", "synchapi", "winbase",
"winuser"]
diff --git a/rust-cpal.spec b/rust-cpal.spec
new file mode 100644
index 0000000..2a42c1f
--- /dev/null
+++ b/rust-cpal.spec
@@ -0,0 +1,91 @@
+# Generated by rust2rpm 17
+# Deactivate tests until ringbuf is package
+%bcond_with check
+%global debug_package %{nil}
+
+%global crate cpal
+
+Name: rust-%{crate}
+Version: 0.13.3
+Release: 1%{?dist}
+Summary: Low-level cross-platform audio I/O library in pure Rust
+
+# Upstream license specification: Apache-2.0
+License: ASL 2.0
+URL:
https://crates.io/crates/cpal
+Source: %{crates_source}
+# Initial patched metadata
+# Remove other OS dependency
+Patch0: cpal-fix-metadata.diff
+
+ExclusiveArch: %{rust_arches}
+%if %{__cargo_skip_build}
+BuildArch: noarch
+%endif
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Low-level cross-platform audio I/O library in pure Rust.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages
+which use "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%doc README.md CHANGELOG.md
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%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 "default" feature of "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+jack-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+jack-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "jack" feature of "%{crate}" crate.
+
+%files -n %{name}+jack-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Fri Jun 25 15:59:31 EDT 2021 Rémi Lauzier <remilauzier(a)protonmail.com> -
0.13.3-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..36c0439
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (cpal-0.13.3.crate) =
fa081c28aa116b2280c37a8f9ea55dbada03c1b08cfbc90fba100ccb00a36fc1cff9fae7e4fba476b1df84b273b964899ccce04035411c6b7cb7cb83ae62af4b