Merge pull request #4940 from diizzyy/patch-95
[feed/packages.git] / utils / triggerhappy / Makefile
1 #
2 # Copyright (C) 2014-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=triggerhappy
11 PKG_VERSION:=0.5.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/wertarbyte/$(PKG_NAME)/archive/release/$(PKG_VERSION)/
16 PKG_HASH:=af0fc196202f2d35153be401769a9ad9107b5b6387146cfa8895ae9cafad631c
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
19
20 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
21 PKG_LICENSE:=GPL-3.0
22 PKG_LICENSE_FILES:=COPYING
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/triggerhappy
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=handle input events and run configured programs
30 URL:=http://github.com/wertarbyte/triggerhappy
31 endef
32
33 define Package/triggerhappy/description
34 triggerhappy - handle input events and run configured programs
35 The daemon thd can handle hotplugged input devices and is configured through
36 simple configuration files in /etc/triggerhappy/triggers.d/.
37 endef
38
39 MAKE_FLAGS += \
40 $(TARGET_CONFIGURE_OPTS) \
41 $(1)
42
43 define Package/triggerhappy/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_DIR) $(1)/etc
46 $(INSTALL_DIR) $(1)/etc/init.d
47 $(INSTALL_DIR) $(1)/etc/triggerhappy
48 $(INSTALL_DIR) $(1)/etc/triggerhappy/triggers.d/
49 $(INSTALL_DIR) $(1)/etc/hotplug.d/input/
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/thd $(1)/usr/sbin
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/th-cmd $(1)/usr/sbin
52 $(INSTALL_BIN) ./files/triggerhappy.init $(1)/etc/init.d/triggerhappy
53 $(INSTALL_BIN) ./files/triggerhappy.hotplug $(1)/etc/hotplug.d/input/10-triggerhappy
54 $(INSTALL_BIN) ./files/triggerhappy-example.conf $(1)/etc/triggerhappy/triggers.d/example.conf
55 endef
56
57 $(eval $(call BuildPackage,triggerhappy))