# Generated by rust2rpm 26
%bcond_without check

# prevent library files from being installed
%global cargo_install_lib 0

%global crate swayr

Name:           rust-swayr
Version:        0.27.3
Release:        %autorelease
Summary:        LRU window-switcher (and more) for the sway window manager

License:        GPL-3.0+
URL:            https://crates.io/crates/swayr
Source:         %{crates_source}
Source:         swayr-0.27.3-vendor.tar.xz

BuildRequires:  cargo-rpm-macros >= 26

%global _description %{expand:
A LRU window-switcher (and more) for the sway window manager.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# FIXME: paste output of %%cargo_license_summary here
License:        # FIXME
# LICENSE.dependencies contains a full license breakdown

%description -n %{crate} %{_description}

%files       -n %{crate}
# FIXME: no license files detected
%license LICENSE.dependencies
%license cargo-vendor.txt
%doc NEWS.md
%doc README.md
%{_bindir}/swayr
%{_bindir}/swayrd

%prep
%autosetup -n %{crate}-%{version} -p1 -a1
%cargo_prep -v vendor

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%{cargo_vendor_manifest}

%install
%cargo_install

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

%changelog
%autochangelog