%global shell_version 48 Name: keyd Version: 2.5.0 Release: %autorelease Summary: A key remapper for the Linux License: MIT URL: https://github.com/rvaiya/%{name} Source: %{url}/archive/refs/tags/v%{version}.tar.gz Patch: 0001-make-Move-service-generation-into-install-target-801.patch Patch: 0001-Enable-GNOME-extension-for-v47.patch Patch: 0001-keyd-application-mapper-Add-explicit-support-for-gno.patch Patch: 0001-make-sysusers.d-file.patch Patch: 0002-make-install-LICENSE-and-README.md.patch Patch: 0003-make-allow-force-install-systemd.patch Patch: 0004-make-install-gnome-extension-in-the-right-directory.patch BuildRequires: gcc-c++ BuildRequires: kernel-headers BuildRequires: systemd-rpm-macros %description Linux lacks a good key remapping solution. In order to achieve satisfactory results a medley of tools need to be employed (e.g xcape, xmodmap) with the end result often being tethered to a specified environment (X11). keyd attempts to solve this problem by providing a flexible system wide daemon which remaps keys using kernel level input primitives (evdev, uinput). %package -n gnome-shell-extension-keyd Summary: Gnome Shell Extension used by keyd to obtain active window information. Requires: gnome-shell <= %{shell_version} %description -n gnome-shell-extension-keyd Gnome Shell Extension used by keyd to obtain active window information. %prep %autosetup -p1 %build %make_build PREFIX=%{_prefix} COMMIT=tag %install %make_install PREFIX=%{_prefix} FORCE_SYSTEMD=1 install -Dm644 LICENSE -t "%{buildroot}/usr/share/licenses/keyd" %check [[ $(bin/keyd --version) = "keyd v%{version} (tag)" ]] grep 'shell-version.*%{shell_version}' data/gnome-extension-45/metadata.json %files %{_bindir}/%{name} %{_bindir}/%{name}-application-mapper %{_docdir}/%{name} %{_datadir}/%{name} %{_unitdir}/%{name}.service %{_sysusersdir}/%{name}.conf %{_mandir}/man1/%{name}.1.gz %{_mandir}/man1/%{name}-application-mapper.1.gz %license LICENSE %files -n gnome-shell-extension-keyd %{_datadir}/gnome-shell/extensions/keyd@keyd.rvaiya.github.com/ %changelog %autochangelog