# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}
%global crate drm-ffi
Name: rust-drm-ffi
Version: 0.7.1
Release: %autorelease
Summary: Safe, low-level bindings to the Direct Rendering Manager API
License: MIT
URL: https://crates.io/crates/drm-ffi
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * regenerate bindings by default
Patch: drm-ffi-fix-metadata.diff
# ffi: fix build with libdrm 2.4.120
# https://github.com/Smithay/drm-rs/pull/189
Patch: drm-ffi-deadline-nsec.patch
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Safe, low-level bindings to the Direct Rendering Manager API.}
%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
%{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
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog