# Generated by rust2rpm 20
%ifnarch %{ix86} x86_64
%bcond_without check
%else
# armv7hl, aarch64, ppc64le, s390:
# the test using static_dict! is failing with E0308
# expected *const u8, got *const i8
%bcond_without check
%endif
%global debug_package %{nil}
%global crate pipewire
Name: rust-%{crate}
Version: 0.4.1
Release: %autorelease
Summary: Rust bindings for PipeWire
# Upstream license specification: MIT
License: MIT
URL: https://crates.io/crates/pipewire
Source: %{crates_source}
# error[E0277]: the trait bound `i32: From<u32>` is not satisfied
# --> src/loop_.rs:414:50
# |
# 414 | tv_nsec: duration.subsec_nanos().into(),
# | ^^^^ the trait `From<u32>` is not implemented for `i32`
# |
# = help: the following implementations were found:
# <i32 as From<NonZeroI32>>
# <i32 as From<bool>>
# <i32 as From<i16>>
# <i32 as From<i8>>
# and 3 others
# = note: required because of the requirements on the impl of `Into<i32>` for `u32`
Patch0: %{crate}-0.4.1-cast-on-32bit.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
%global _description %{expand:
Rust bindings for PipeWire.}
%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
%doc README.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 the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%setup -n %{crate}-%{version_no_tilde} -q
%ifarch %{arm} %{ix86}
%patch0 -p1
%endif
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog