initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
config BR2_PACKAGE_TRIGGERHAPPY
|
||||
bool "triggerhappy"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
Triggerhappy is a hotkey daemon developed with small and
|
||||
embedded systems in mind, e.g. linux based routers. It
|
||||
attaches to the input device files and interprets the event
|
||||
data received and executes scripts configured in its
|
||||
configuration.
|
||||
|
||||
https://github.com/wertarbyte/triggerhappy
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME=thd
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --pidfile $PIDFILE --user nobody /dev/input/event*"
|
||||
|
||||
[ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy
|
||||
|
||||
start() {
|
||||
printf "Starting $NAME: "
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /usr/sbin/thd -- $DAEMON_ARGS \
|
||||
&& echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping $NAME: "
|
||||
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
|
||||
&& echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 af0fc196202f2d35153be401769a9ad9107b5b6387146cfa8895ae9cafad631c triggerhappy-0.5.0.tar.gz
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
@@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
#
|
||||
# triggerhappy
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TRIGGERHAPPY_VERSION = 0.5.0
|
||||
TRIGGERHAPPY_SITE = \
|
||||
$(call github,wertarbyte,triggerhappy,release/$(TRIGGERHAPPY_VERSION))
|
||||
TRIGGERHAPPY_LICENSE = GPL-3.0+
|
||||
TRIGGERHAPPY_LICENSE_FILES = COPYING
|
||||
TRIGGERHAPPY_DEPENDENCIES = host-pkgconf
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
TRIGGERHAPPY_DEPENDENCIES += systemd
|
||||
endif
|
||||
|
||||
define TRIGGERHAPPY_BUILD_CMDS
|
||||
$(MAKE) $(TARGET_CONFIGURE_OPTS) PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \
|
||||
-C $(@D) thd th-cmd
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
||||
define TRIGGERHAPPY_INSTALL_UDEV_RULE
|
||||
$(INSTALL) -D -m 0644 $(@D)/udev/triggerhappy-udev.rules \
|
||||
$(TARGET_DIR)/lib/udev/rules.d/triggerhappy.rules
|
||||
endef
|
||||
endif
|
||||
|
||||
define TRIGGERHAPPY_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -d $(TARGET_DIR)/etc/triggerhappy/triggers.d
|
||||
$(INSTALL) -D -m 0755 $(@D)/thd $(TARGET_DIR)/usr/sbin/thd
|
||||
$(INSTALL) -D -m 0755 $(@D)/th-cmd $(TARGET_DIR)/usr/sbin/th-cmd
|
||||
$(TRIGGERHAPPY_INSTALL_UDEV_RULE)
|
||||
endef
|
||||
|
||||
define TRIGGERHAPPY_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D package/triggerhappy/S10triggerhappy \
|
||||
$(TARGET_DIR)/etc/init.d/S10triggerhappy
|
||||
endef
|
||||
|
||||
define TRIGGERHAPPY_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/triggerhappy/triggerhappy.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/triggerhappy.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Triggerhappy daemon
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --user nobody --deviceglob /dev/input/event*
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user