%global debug_package %{nil} Name: forcetouchd Version: 0.15.1 Release: 1%{?dist} Summary: Force Touch trackpad click strength, force click and UI haptics License: MIT Source0: %{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 26 BuildRequires: gcc BuildRequires: systemd-rpm-macros %{?systemd_requires} %description Click strength, host-side click detection and force click for Force Touch trackpads on Apple Silicon MacBooks, plus a user service that plays the macOS UI haptic on niri events such as workspace switches. %prep %autosetup -n %{name}-%{version} %cargo_prep -N # build online: the crates are not packaged for Fedora sed -i 's/^offline = true$//' .cargo/config.toml %build %{__cargo} build %{__cargo_common_opts} --profile rpm -p forcetouchd %install install -Dpsm0755 target/rpm/forcetouchd %{buildroot}%{_bindir}/forcetouchd install -Dm644 crates/forcetouchd/forcetouchd.service %{buildroot}%{_unitdir}/forcetouchd.service install -Dm644 crates/forcetouchd/forcetouchd-ui.service %{buildroot}%{_userunitdir}/forcetouchd-ui.service install -Dm644 crates/forcetouchd/90-forcetouchd.preset %{buildroot}%{_userpresetdir}/90-forcetouchd.preset install -Dm644 crates/forcetouchd/90-forcetouchd.preset %{buildroot}%{_presetdir}/90-forcetouchd.preset install -Dm644 crates/forcetouchd/forcetouchd.toml %{buildroot}%{_sysconfdir}/forcetouchd.toml %check %{__cargo} test %{__cargo_common_opts} --profile rpm --no-fail-fast -p forcetouchd %post %systemd_post forcetouchd.service if [ $1 -eq 1 ] && systemctl -q is-enabled forcetouchd.service; then systemctl --no-block start forcetouchd.service || :; fi %systemd_user_post forcetouchd-ui.service if [ $1 -eq 1 ]; then for uid in $(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+)\.service.*/\1/p'); do systemctl --user -M $uid@ -q is-enabled forcetouchd-ui.service && systemctl --user -M $uid@ -q is-active graphical-session.target && systemctl --user -M $uid@ --no-block start forcetouchd-ui.service || : done fi %preun %systemd_preun forcetouchd.service %systemd_user_preun forcetouchd-ui.service %postun %systemd_postun_with_restart forcetouchd.service %systemd_user_postun_with_restart forcetouchd-ui.service %files %license LICENSE %{_bindir}/forcetouchd %{_unitdir}/forcetouchd.service %{_userunitdir}/forcetouchd-ui.service %{_userpresetdir}/90-forcetouchd.preset %{_presetdir}/90-forcetouchd.preset %config(noreplace) %{_sysconfdir}/forcetouchd.toml %changelog * Wed Nov 18 2026 Lachlan Marie - 0.15.1-1 - Start services on first install - Enable by preset * Mon Nov 09 2026 Lachlan Marie - 0.15.0-1 - Split from apple-extras