summaryrefslogtreecommitdiffstats
path: root/package/triggerhappy/triggerhappy.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2014-12-08 23:55:28 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-12-12 00:07:10 +0100
commit6e2b80968f59bb78bda199b89a8eaac5931454e7 (patch)
tree5957e1bfb0afdaae8b422fd7cd1021eb99a14310 /package/triggerhappy/triggerhappy.mk
parent9bb7d10eeadf4aebefde672de0b81e0d321fb5b0 (diff)
downloadbuildroot-6e2b80968f59bb78bda199b89a8eaac5931454e7.tar.gz
buildroot-6e2b80968f59bb78bda199b89a8eaac5931454e7.zip
triggerhappy: new package
[Thomas: - add BR2_USE_MMU dependency, since fork() is used - rename do_start() and do_stop() to just start() and stop(), as we do in most init scripts in Buildroot.] Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/triggerhappy/triggerhappy.mk')
-rw-r--r--package/triggerhappy/triggerhappy.mk37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/triggerhappy/triggerhappy.mk b/package/triggerhappy/triggerhappy.mk
new file mode 100644
index 0000000000..d3dfc6a18e
--- /dev/null
+++ b/package/triggerhappy/triggerhappy.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# triggerhappy
+#
+################################################################################
+
+TRIGGERHAPPY_VERSION = aac9f353a28c0f414b27ac54bbbb2292c152eedc
+TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION))
+TRIGGERHAPPY_LICENSE = GPLv3+
+TRIGGERHAPPY_LICENSE_FILES = COPYING
+
+define TRIGGERHAPPY_BUILD_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ LINUX_INPUT_H=$(STAGING_DIR)/usr/include/linux/input.h \
+ -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
+
+$(eval $(generic-package))
OpenPOWER on IntegriCloud