File wmfocus.spec of Package wmfocus

#
# spec file for package wmfocus
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           wmfocus
Version:        1.4.0+git20230607.3fe4853
Release:        0
Summary:        Visually focus windows by label
License:        MIT
URL:            https://github.com/svenstaro/%{name}
Source0:        %{name}-%{version}.tar.gz
Source1:        vendor.tar.zst
Source2:        cargo_config
BuildRequires:  cargo
BuildRequires:  cargo-packaging
BuildRequires:  cmake
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(xcb-keysyms)
BuildRequires:  pkgconfig(xkbcommon-x11)
BuildRequires:  rust

%description
This tool that allows you to rapidly choose a specific window directly without
having to use the mouse or directional keyboard navigation.
Thanks to cairo, it should work on all kinds of screens and automatically
display at the correct size according to your DPI.

%prep
%autosetup -a1
mkdir .cargo
cp %{SOURCE2} .cargo/config

%build
cargo build --features i3 --frozen --release

%install
install -v -Dm755 target/release/wmfocus %{buildroot}%{_bindir}/wmfocus

%files
%{_bindir}/%{name}
%license LICENSE
%doc README.md

%changelog

openSUSE Build Service is sponsored by