build: Install udev rule

Don't hide it in the packaging as that makes it easier to miss.

This makes debian/ really only carry packaging information.
This commit is contained in:
Guido Günther
2024-08-07 12:14:26 +02:00
parent 662307d7d8
commit 47b0b1c0e7
8 changed files with 25 additions and 10 deletions
+19
View File
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of feedbackd.
ACTION=="remove", GOTO="feedbackd_end"
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT}=="1", ENV{ID_PATH}=="platform-vibrator", TAG+="uaccess", ENV{FEEDBACKD_TYPE}="vibra"
#
# See include/dt-bindings/leds/common.h in the linux kernel
#
# Status LEDs
SUBSYSTEM=="leds", DEVPATH=="*/*:status", ENV{FEEDBACKD_TYPE}="led", RUN{builtin}+="kmod load ledtrig-pattern", RUN+="/usr/libexec/fbd-ledctrl -p %S%p -t pattern -G feedbackd"
SUBSYSTEM=="leds", DEVPATH=="*/*:indicator", ENV{FEEDBACKD_TYPE}="led", RUN{builtin}+="kmod load ledtrig-pattern", RUN+="/usr/libexec/fbd-ledctrl -p %S%p -t pattern -G feedbackd"
# Camera Flash
SUBSYSTEM=="leds", DEVPATH=="*/*:flash", ENV{FEEDBACKD_TYPE}="led", RUN{builtin}+="kmod load ledtrig-pattern", RUN+="/usr/libexec/fbd-ledctrl -p %S%p -t pattern -G feedbackd"
SUBSYSTEM=="leds", DEVPATH=="*/*:torch", ENV{FEEDBACKD_TYPE}="led", RUN{builtin}+="kmod load ledtrig-pattern", RUN+="/usr/libexec/fbd-ledctrl -p %S%p -t pattern -G feedbackd"
LABEL="feedbackd_end"
+4
View File
@@ -68,4 +68,8 @@ if json_glib_validate.found()
command: [json_glib_validate.full_path()] + jsons)
endif
if get_option('udev')
install_data('90-feedbackd.rules', install_dir: udevdir)
endif
endif # daemon