%global forgeurl https://github.com/whereswaldon/kfreestyle2d %global commit 930dacf1d740e704622bb79fd058f2c6e3f4364a Name: kfreestyle2d Version: 0 %forgemeta Release: 1%{?dist} Summary: Unofficial Kinesis Freestyle 2 Userspace Linux Driver License: MIT URL: %{forgeurl} Source0: %{forgesource} Source1: kfreestyle2d@.service Source2: kfreestyle2d.rules BuildRequires: gcc BuildRequires: systemd-rpm-macros Requires: systemd-udev %description The Kinesis Freestyle 2 keyboard is a fantastic split keyboard for people who don't want RSI in their wrists. It has four multimedia keys on F8-F11 that do not work in Linux. This is a simple program that enables those keys. %prep %forgesetup %build %make_build %install install -D -p %{name} %{buildroot}%{_libexecdir}/%{name}/%{name} mkdir -p %{buildroot}%{_unitdir} install -D -p %{SOURCE1} %{buildroot}%{_userunitdir}/kfreestyle2d@.service install -D -p %{SOURCE2} %{buildroot}%{_udevrulesdir}/60-%{name}.rules %post if [ $1 -eq 1 ]; then # Initial installation udevadm control --reload # udevadm trigger fi %postun # Upgrades and final removals udevadm control --reload # udevadm trigger %files %license LICENSE %doc README.md %dir %{_libexecdir}/%{name}/ %attr(0755,-,-) %{_libexecdir}/%{name}/%{name} %{_userunitdir}/*.service %{_udevrulesdir}/*.rules %changelog * Sat Apr 20 2024 Aurelien Bompard - Initial package