%global commitdate 20200710 %global commit 91d3861f2d35c7e7c1b0334c02a24ab99f48ad7e %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: rogdrv Version: 0.0.5_%{commitdate}.%{shortcommit} Release: 1%{?dist} Summary: ASUS ROG userspace mouse driver License: GPL-3 BuildArch: noarch URL: https://github.com/kyokenn/rogdrv Source: https://github.com/kyokenn/rogdrv/archive/%{commit}/fsearch-%{version}.tar.gz Patch0: rogdrv-%{version}_fix_udev_rule_installation.patch Patch1: rogdrv-%{version}_add_tuf_gaming_m5_support.patch BuildRequires: python-rpm-macros BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-evdev Requires: python3-hidapi Requires: libappindicator %description a simple ASUS ROG (Republic of Gamers) userspace mouse driver for Linux. The mouse device consists of 2 input devices: mouse and keyboard. The keyboard part is unsupported on Linux, but it's recognised as HID device. So this driver maps HID events to the generic keyboard events. The protocol was reverse-engineered, so everything is experimental. Use at your own risk. %prep %autosetup -p1 -n %{name}-%{commit} %build %py3_build %install %py3_install %post udevadm control --reload-rules &>/dev/null %files %doc README.* %{_bindir}/rogdrv %{_bindir}/rogdrv-config %{_usr}/lib/udev/rules.d/50-rogdrv.rules %{python3_sitelib}/%{name}* %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/rog.png %changelog * Tue Oct 27 2020 Yury Martynov 0.0.5_20200710.91d3861-1 - Initial packaging.