Peter Korsgaard | 6e2b809 | 2014-12-08 23:55:28 +0100 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # triggerhappy |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Michael Heinemann | 3e23b1c | 2017-04-26 16:57:58 +0200 | [diff] [blame] | 7 | TRIGGERHAPPY_VERSION = b822888066129350e51ad79f1cf307fa38dae4f7 |
Peter Korsgaard | 6e2b809 | 2014-12-08 23:55:28 +0100 | [diff] [blame] | 8 | TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION)) |
Rahul Bedarkar | 337aa51 | 2017-03-30 19:13:33 +0530 | [diff] [blame] | 9 | TRIGGERHAPPY_LICENSE = GPL-3.0+ |
Peter Korsgaard | 6e2b809 | 2014-12-08 23:55:28 +0100 | [diff] [blame] | 10 | TRIGGERHAPPY_LICENSE_FILES = COPYING |
| 11 | |
| 12 | define TRIGGERHAPPY_BUILD_CMDS |
Jörg Krause | cc9304a | 2016-01-19 10:51:53 +0100 | [diff] [blame] | 13 | $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) thd th-cmd |
Peter Korsgaard | 6e2b809 | 2014-12-08 23:55:28 +0100 | [diff] [blame] | 14 | endef |
| 15 | |
| 16 | ifeq ($(BR2_PACKAGE_HAS_UDEV),y) |
| 17 | define TRIGGERHAPPY_INSTALL_UDEV_RULE |
| 18 | $(INSTALL) -D -m 0644 $(@D)/udev/triggerhappy-udev.rules \ |
| 19 | $(TARGET_DIR)/lib/udev/rules.d/triggerhappy.rules |
| 20 | endef |
| 21 | endif |
| 22 | |
| 23 | define TRIGGERHAPPY_INSTALL_TARGET_CMDS |
| 24 | $(INSTALL) -d $(TARGET_DIR)/etc/triggerhappy/triggers.d |
| 25 | $(INSTALL) -D -m 0755 $(@D)/thd $(TARGET_DIR)/usr/sbin/thd |
| 26 | $(INSTALL) -D -m 0755 $(@D)/th-cmd $(TARGET_DIR)/usr/sbin/th-cmd |
| 27 | $(TRIGGERHAPPY_INSTALL_UDEV_RULE) |
| 28 | endef |
| 29 | |
| 30 | define TRIGGERHAPPY_INSTALL_INIT_SYSV |
| 31 | $(INSTALL) -m 0755 -D package/triggerhappy/S10triggerhappy \ |
| 32 | $(TARGET_DIR)/etc/init.d/S10triggerhappy |
| 33 | endef |
| 34 | |
Alex Suykov | 7ee5eb9 | 2015-05-23 13:14:07 +0300 | [diff] [blame] | 35 | define TRIGGERHAPPY_INSTALL_INIT_SYSTEMD |
| 36 | $(INSTALL) -D -m 644 package/triggerhappy/triggerhappy.service \ |
| 37 | $(TARGET_DIR)/usr/lib/systemd/system/triggerhappy.service |
| 38 | mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants |
| 39 | ln -sf ../../../../usr/lib/systemd/system/triggerhappy.service \ |
| 40 | $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/triggerhappy.service |
| 41 | endef |
| 42 | |
Peter Korsgaard | 6e2b809 | 2014-12-08 23:55:28 +0100 | [diff] [blame] | 43 | $(eval $(generic-package)) |