# 基础元信息 Name: letsnote-wheelpad Version: 0.1.0 Release: 1%{?dist} Summary: Userspace daemon to enable circular scrolling on Panasonic Let's Note WheelPad License: MIT URL: https://github.com/reAAAq/panasonic_letsnote_wheelpad_linux_driver Source0: https://github.com/reAAAq/panasonic_letsnote_wheelpad_linux_driver/archive/refs/heads/main.zip # 构建依赖 BuildRequires: cargo BuildRequires: rust BuildRequires: systemd-rpm-macros # 运行时依赖 Requires: systemd %description A userspace Linux daemon that reproduces the circular scrolling behavior of the Panasonic Let's Note "WheelPad". It reads physical Synaptics touchpad evdev events and emits scroll wheel events via a uinput virtual device, working on both Wayland and X11. %prep %autosetup -n panasonic_letsnote_wheelpad_linux_driver-main %build %{cargo_build} %install %{cargo_install} # 安装二进制文件 install -Dm755 target/release/%{name} %{buildroot}%{_bindir}/%{name} # 安装 udev 规则 install -Dm644 packaging/udev/70-letsnote-wheelpad.rules \ %{buildroot}%{_udevrulesdir}/70-letsnote-wheelpad.rules # 安装 systemd 用户服务 install -Dm644 packaging/systemd/letsnote-wheelpad.service \ %{buildroot}%{_userunitdir}/letsnote-wheelpad.service # 安装 modules-load 配置(确保 uinput 模块加载) install -Dm644 packaging/modules-load/letsnote-wheelpad.conf \ %{buildroot}%{_modulesloaddir}/letsnote-wheelpad.conf %check %{cargo_test} %files %license LICENSE %doc README.md README.en.md %{_bindir}/%{name} %{_udevrulesdir}/70-letsnote-wheelpad.rules %{_userunitdir}/letsnote-wheelpad.service %{_modulesloaddir}/letsnote-wheelpad.conf %post # 重新加载 udev 规则 /usr/bin/udevadm control --reload-rules && /usr/bin/udevadm trigger >/dev/null 2>&1 || : # 加载 uinput 内核模块 /sbin/modprobe uinput >/dev/null 2>&1 || : # 重新加载 systemd 用户服务 /usr/bin/systemctl --user daemon-reload >/dev/null 2>&1 || : %postun # 重新加载 udev 规则 /usr/bin/udevadm control --reload-rules && /usr/bin/udevadm trigger >/dev/null 2>&1 || : %changelog * Tue Sep 01 2026 Your Name - 0.1.0-1 - Initial RPM package for letsnote-wheelpad