Blob Blame History Raw
# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}

%global crate xkbcommon

Name:           rust-xkbcommon
Version:        0.7.0
Release:        %autorelease
Summary:        Rust bindings and wrappers for libxkbcommon

License:        MIT
URL:            https://crates.io/crates/xkbcommon
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
#  * Update memmap2 to 0.9.0
#  * Drop "quick-evdev" example due to unpackaged "evdev" crate
Patch:          xkbcommon-fix-metadata.diff

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Rust bindings and wrappers for libxkbcommon.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       libxkbcommon-devel

%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}+as-raw-xcb-connection-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+as-raw-xcb-connection-devel %{_description}

This package contains library source intended for building other packages which
use the "as-raw-xcb-connection" feature of the "%{crate}" crate.

%files       -n %{name}+as-raw-xcb-connection-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+memmap2-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+memmap2-devel %{_description}

This package contains library source intended for building other packages which
use the "memmap2" feature of the "%{crate}" crate.

%files       -n %{name}+memmap2-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+wayland-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+wayland-devel %{_description}

This package contains library source intended for building other packages which
use the "wayland" feature of the "%{crate}" crate.

%files       -n %{name}+wayland-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+x11-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+x11-devel %{_description}

This package contains library source intended for building other packages which
use the "x11" feature of the "%{crate}" crate.

%files       -n %{name}+x11-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# requires unpackaged dependency "evdev"
rm -f examples/quick-evdev.rs

%generate_buildrequires
%cargo_generate_buildrequires
echo 'libxkbcommon-devel'

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
%autochangelog