%global kwin_target 6.8.0 # The core library and libevdev-cpp are git submodules upstream; they are # compiled statically into the plugin, so they are pulled in as extra sources. %global core_version 0.9.2 %global evdevcpp_commit d55995a0d639f7ca08f0cd506cf6c02cdfca5d81 %global evdevcpp_shortcommit %(c=%{evdevcpp_commit}; echo ${c:0:7}) # KWin has no stable plugin ABI, so the plugin must be rebuilt for every KWin # release. scripts/srpm.sh prepends "%%global kwin_target " with the # KWin version of the target Fedora release, which goes into Release so that a # rebuild against a newer KWin is always an upgrade. It must be a literal: # mock regenerates the SRPM inside the buildroot and expects the same NVR. # # kwin_ver is the KWin version actually present in the buildroot; the binary # package is pinned to it. %{lua: local f = io.popen("rpm -q --qf '%{VERSION}' kwin-devel 2>/dev/null") local v = f:read("*a") f:close() if v:match("^%d[%w.]*$") then rpm.define("kwin_ver " .. v) end } Name: inputactions-kwin Version: 0.9.2.1 Release: 1%{?kwin_target:.kwin%{kwin_target}}%{?dist} Summary: Custom mouse, touchpad, touchscreen and keyboard gestures for KWin # Everything is GPL-3.0-or-later except src/textinput.h, copied from KWin. License: GPL-3.0-or-later AND (LGPL-2.1-only OR LGPL-3.0-only) URL: https://github.com/InputActions/kwin Source0: %{url}/archive/v%{version}/kwin-%{version}.tar.gz Source1: https://github.com/InputActions/core/archive/v%{core_version}/core-%{core_version}.tar.gz Source2: https://github.com/InputActions/libevdev-cpp/archive/%{evdevcpp_commit}/libevdev-cpp-%{evdevcpp_shortcommit}.tar.gz BuildRequires: cmake BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ BuildRequires: kf6-rpm-macros BuildRequires: kwin-devel # Required by KWinConfig.cmake but not pulled in by kwin-devel BuildRequires: pkgconfig(epoxy) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(vulkan) BuildRequires: vulkan-headers BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(KF6CoreAddons) BuildRequires: cmake(KF6I18n) BuildRequires: cmake(KF6KCMUtils) BuildRequires: pkgconfig(libevdev) BuildRequires: pkgconfig(xkbcommon) BuildRequires: yaml-cpp-devel %if %{defined kwin_ver} Requires: kwin-libs%{?_isa} = %{kwin_ver} %endif Recommends: inputactions-ctl Provides: bundled(inputactions-core) = %{core_version} Provides: bundled(libevdev-cpp) = 0.0.1^git%{evdevcpp_shortcommit} %description InputActions binds keyboard, mouse, touchpad and touchscreen input (gestures, key and button combinations, strokes, etc.) to actions such as running commands, emitting input or invoking Plasma global shortcuts. This package contains the KWin compositor plugin implementation. Enable it in System Settings > Desktop Effects > Tools > InputActions, or run: qdbus6 org.kde.KWin /Effects org.kde.kwin.Effects.loadEffect kwin_gestures KWin must be restarted (log out and back in) after this package is updated. %prep %setup -q -n kwin-%{version} -a 1 -a 2 rmdir lib/core mv core-%{core_version} lib/core rmdir lib/core/lib/libevdev-cpp mv libevdev-cpp-%{evdevcpp_commit} lib/core/lib/libevdev-cpp %build %if %{defined kwin_target} if [ "%{?kwin_ver}" != "%{kwin_target}" ]; then echo "SRPM targets KWin %{kwin_target} but the buildroot has KWin %{?kwin_ver}; regenerate it" >&2 exit 1 fi %endif %cmake_kf6 -DCMAKE_BUILD_TYPE=Release %cmake_build %install %cmake_install %files %license LICENSE %doc README.md %{_kf6_qtplugindir}/kwin/effects/plugins/kwin_gestures.so %{_kf6_qtplugindir}/kwin/effects/configs/inputactions_kwin_kcm.so %changelog * Sat Oct 17 2026 Nate - 0.9.2.1-1 - Initial package