2014-12-08 23:55:28 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# triggerhappy
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2017-04-26 16:57:58 +02:00
|
|
|
TRIGGERHAPPY_VERSION = b822888066129350e51ad79f1cf307fa38dae4f7
|
2014-12-08 23:55:28 +01:00
|
|
|
TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION))
|
2017-03-30 15:43:33 +02:00
|
|
|
TRIGGERHAPPY_LICENSE = GPL-3.0+
|
2014-12-08 23:55:28 +01:00
|
|
|
TRIGGERHAPPY_LICENSE_FILES = COPYING
|
2018-06-11 20:24:47 +02:00
|
|
|
TRIGGERHAPPY_DEPENDENCIES = host-pkgconf
|
2014-12-08 23:55:28 +01:00
|
|
|
|
2018-06-11 20:24:48 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
|
|
|
TRIGGERHAPPY_DEPENDENCIES += systemd
|
|
|
|
endif
|
|
|
|
|
2014-12-08 23:55:28 +01:00
|
|
|
define TRIGGERHAPPY_BUILD_CMDS
|
2018-06-11 20:24:47 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \
|
|
|
|
-C $(@D) thd th-cmd
|
2014-12-08 23:55:28 +01:00
|
|
|
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
|
|
|
|
|
2015-05-23 12:14:07 +02:00
|
|
|
define TRIGGERHAPPY_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/triggerhappy/triggerhappy.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/triggerhappy.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -sf ../../../../usr/lib/systemd/system/triggerhappy.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/triggerhappy.service
|
|
|
|
endef
|
|
|
|
|
2014-12-08 23:55:28 +01:00
|
|
|
$(eval $(generic-package))
|