From 6f74fcd5ef6f9ddb1227abaafe90c89902468e30 Mon Sep 17 00:00:00 2001 From: madomado Date: Sat, 13 Jan 2024 17:05:41 +0800 Subject: [PATCH] fix: keyd (#890) * fix: keyd keyd did not include service by default. * fix: add install scripts --- anda/tools/keyd/keyd.spec | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/anda/tools/keyd/keyd.spec b/anda/tools/keyd/keyd.spec index 2f249dae93..b386b9474a 100644 --- a/anda/tools/keyd/keyd.spec +++ b/anda/tools/keyd/keyd.spec @@ -6,7 +6,7 @@ URL: https://github.com/rvaiya/keyd License: MIT Source0: %url/archive/refs/tags/v%version.tar.gz Suggests: python3 python3-xlib -BuildRequires: gcc mold make kernel-headers +BuildRequires: gcc mold make kernel-headers systemd-rpm-macros %description keyd provides a flexible system wide daemon which remaps keys using kernel @@ -20,16 +20,27 @@ level input primitives (evdev, uinput). %install %make_install +install -Dm644 keyd.service %buildroot%_unitdir/keyd.service + +%post +%systemd_post keyd.service + +%preun +%systemd_preun keyd.service + +%postun +%systemd_postun_with_restart keyd.service %files %doc README.md %license LICENSE -/usr/bin/keyd -/usr/bin/keyd-application-mapper -/usr/share/doc/keyd/ -/usr/share/keyd -/usr/share/man/man1/keyd-application-mapper.1.gz -/usr/share/man/man1/keyd.1.gz +%_unitdir/keyd.service +%_bindir/keyd +%_bindir/keyd-application-mapper +%_datadir/keyd +%_datadir/doc/keyd/ +%_mandir/man1/keyd-application-mapper.1.gz +%_mandir/man1/keyd.1.gz %changelog * Tue May 23 2023 windowsboy111 - 2.4.3-1