OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Commit Details
Date: | 2010-11-20 17:01:36 (13 years 4 months ago) |
---|---|
Author: | Xiangfu Liu |
Commit: | 9417998cb0323490cbd3506d527f0866c36201ee |
Message: | triggerhappy: rename it to triggersad, update download URL Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc> |
Files: |
utils/triggerhappy/Makefile (1 diff) utils/triggerhappy/files/triggerhappy-example.conf (1 diff) utils/triggerhappy/files/triggerhappy.hotplug (1 diff) utils/triggerhappy/files/triggerhappy.init (1 diff) utils/triggerhappy/patches/001-input.patch (1 diff) utils/triggersad/Makefile (1 diff) utils/triggersad/files/triggerhappy-example.conf (1 diff) utils/triggersad/files/triggerhappy.hotplug (1 diff) utils/triggersad/files/triggerhappy.init (1 diff) utils/triggersad/patches/001-input.patch (1 diff) |
Change Details
utils/triggerhappy/Makefile | ||
---|---|---|
1 | # | |
2 | # This is free software, licensed under the GNU General Public License v2. | |
3 | # See /LICENSE for more information. | |
4 | # | |
5 | ||
6 | include $(TOPDIR)/rules.mk | |
7 | ||
8 | PKG_NAME:=triggerhappy | |
9 | PKG_VERSION:=0.1.3 | |
10 | PKG_RELEASE:=1 | |
11 | ||
12 | PKG_SOURCE:=$(PKG_VERSION).tar.gz | |
13 | PKG_SOURCE_URL:=http://github.com/wertarbyte/triggerhappy/tarball/release/ | |
14 | PKG_MD5SUM:=7da137a7d2ba1ce396231e821e68de4e | |
15 | ||
16 | PKG_BUILD_DIR:=$(BUILD_DIR)/wertarbyte-triggerhappy-f7c4216/ | |
17 | ||
18 | include $(INCLUDE_DIR)/package.mk | |
19 | ||
20 | define Package/triggerhappy | |
21 | SECTION:=utils | |
22 | CATEGORY:=Utilities | |
23 | TITLE:=handle input events and run configured programs | |
24 | URL:=http://github.com/wertarbyte/triggerhappy | |
25 | endef | |
26 | ||
27 | define Package/triggerhappy/description | |
28 | triggerhappy - handle input events and run configured programs | |
29 | The daemon thd can handle hotplugged input devices and is configured through | |
30 | simple configuration files in /etc/triggerhappy/triggers.d/. | |
31 | endef | |
32 | ||
33 | MAKE_FLAGS += \ | |
34 | $(TARGET_CONFIGURE_OPTS) \ | |
35 | $(1) | |
36 | ||
37 | MAKE_VARS += TOOLCHAIN_DIR=$(TOOLCHAIN_DIR) | |
38 | ||
39 | define Package/triggerhappy/install | |
40 | $(INSTALL_DIR) $(1)/usr/sbin | |
41 | $(INSTALL_DIR) $(1)/etc | |
42 | $(INSTALL_DIR) $(1)/etc/init.d | |
43 | $(INSTALL_DIR) $(1)/etc/triggerhappy | |
44 | $(INSTALL_DIR) $(1)/etc/triggerhappy/triggers.d/ | |
45 | $(INSTALL_DIR) $(1)/etc/hotplug.d/input/ | |
46 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/thd $(1)/usr/sbin | |
47 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/th-cmd $(1)/usr/sbin | |
48 | $(INSTALL_BIN) ./files/triggerhappy.init $(1)/etc/init.d/triggerhappy | |
49 | $(INSTALL_BIN) ./files/triggerhappy.hotplug $(1)/etc/hotplug.d/input/10-triggerhappy | |
50 | $(INSTALL_BIN) ./files/triggerhappy-example.conf $(1)/etc/triggerhappy/triggers.d/example.conf | |
51 | endef | |
52 | ||
53 | $(eval $(call BuildPackage,triggerhappy)) |
utils/triggerhappy/files/triggerhappy-example.conf | ||
---|---|---|
1 | # This is an example configuration for the triggerhappy daemon (thd) | |
2 | # please note that every file to be processed must end in ".conf" | |
3 | # | |
4 | # To view a list of supported event codes, use "thd --listevents" or | |
5 | # "thd --dump /dev/input/event*" | |
6 | # | |
7 | # Format: | |
8 | # <eventcode> <value> <command> | |
9 | # | |
10 | # values for key events are 1 (pressed), 0 (released) or 2 (held) | |
11 | # | |
12 | ## control an mpd instance | |
13 | # KEY_NEXTSONG 1 /usr/bin/mpc next | |
14 | # KEY_PREVSONG 1 /usr/bin/mpc prev |
utils/triggerhappy/files/triggerhappy.hotplug | ||
---|---|---|
1 | #!/bin/sh | |
2 | THD_SOCKET=/tmp/triggerhappy.socket | |
3 | [ -S "$THD_SOCKET" ] || exit | |
4 | ||
5 | case "$ACTION" in | |
6 | add) | |
7 | DEVICE="/dev/$DEVNAME" | |
8 | [ -c "$DEVICE" ] || exit | |
9 | # offer device to triggerhappy daemon | |
10 | /usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE" | |
11 | ;; | |
12 | remove) | |
13 | # nothing to do | |
14 | ;; | |
15 | esac |
utils/triggerhappy/files/triggerhappy.init | ||
---|---|---|
1 | #!/bin/sh /etc/rc.common | |
2 | START=93 | |
3 | ||
4 | start() { | |
5 | /usr/sbin/thd --socket /tmp/triggerhappy.socket --triggers /etc/triggerhappy/triggers.d/ --daemon /dev/input/event* | |
6 | } | |
7 | ||
8 | stop() { | |
9 | /usr/sbin/th-cmd --socket /tmp/triggerhappy.socket --quit | |
10 | } |
utils/triggerhappy/patches/001-input.patch | ||
---|---|---|
1 | diff -ur triggerhappy-0.1.3.orig/Makefile triggerhappy-0.1.3/Makefile | |
2 | +++ triggerhappy-0.1.3/Makefile 2010-11-18 12:09:55.033025473 +0300 | |
3 | @@ -23,7 +23,7 @@ | |
4 | --release="" \ | |
5 | $< > $@ | |
6 | ||
7 | -evtable_%.h: /usr/include/linux/input.h | |
8 | +evtable_%.h: $(TOOLCHAIN_DIR)/usr/include/linux/input.h | |
9 | awk '/^#define $*_/ && $$2 !~ /_(MAX|CNT|VERSION)$$/ {print "EV_MAP("$$2"),"}' $< > $@ | |
10 | ||
11 | clean: |
utils/triggersad/Makefile | ||
---|---|---|
1 | # | |
2 | # This is free software, licensed under the GNU General Public License v2. | |
3 | # See /LICENSE for more information. | |
4 | # | |
5 | ||
6 | include $(TOPDIR)/rules.mk | |
7 | ||
8 | PKG_NAME:=triggersad | |
9 | PKG_VERSION:=0.1.3 | |
10 | PKG_RELEASE:=1 | |
11 | ||
12 | PKG_SOURCE:=wertarbyte-triggerhappy-release-0.1.3-0-gf7c4216.tar.gz | |
13 | PKG_SOURCE_URL:=http://download.github.com/ | |
14 | PKG_MD5SUM:=7da137a7d2ba1ce396231e821e68de4e | |
15 | ||
16 | PKG_BUILD_DIR:=$(BUILD_DIR)/wertarbyte-triggerhappy-f7c4216/ | |
17 | ||
18 | include $(INCLUDE_DIR)/package.mk | |
19 | ||
20 | define Package/triggersad | |
21 | SECTION:=utils | |
22 | CATEGORY:=Utilities | |
23 | TITLE:=handle input events and run configured programs | |
24 | URL:=http://github.com/wertarbyte/triggerhappy | |
25 | endef | |
26 | ||
27 | define Package/triggersad/description | |
28 | triggerhappy - handle input events and run configured programs | |
29 | The daemon thd can handle hotplugged input devices and is configured through | |
30 | simple configuration files in /etc/triggerhappy/triggers.d/. | |
31 | endef | |
32 | ||
33 | MAKE_FLAGS += \ | |
34 | $(TARGET_CONFIGURE_OPTS) \ | |
35 | $(1) | |
36 | ||
37 | MAKE_VARS += TOOLCHAIN_DIR=$(TOOLCHAIN_DIR) | |
38 | ||
39 | define Package/triggersad/install | |
40 | $(INSTALL_DIR) $(1)/usr/sbin | |
41 | $(INSTALL_DIR) $(1)/etc | |
42 | $(INSTALL_DIR) $(1)/etc/init.d | |
43 | $(INSTALL_DIR) $(1)/etc/triggerhappy | |
44 | $(INSTALL_DIR) $(1)/etc/triggerhappy/triggers.d/ | |
45 | $(INSTALL_DIR) $(1)/etc/hotplug.d/input/ | |
46 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/thd $(1)/usr/sbin | |
47 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/th-cmd $(1)/usr/sbin | |
48 | $(INSTALL_BIN) ./files/triggerhappy.init $(1)/etc/init.d/triggerhappy | |
49 | $(INSTALL_BIN) ./files/triggerhappy.hotplug $(1)/etc/hotplug.d/input/10-triggerhappy | |
50 | $(INSTALL_BIN) ./files/triggerhappy-example.conf $(1)/etc/triggerhappy/triggers.d/example.conf | |
51 | endef | |
52 | ||
53 | $(eval $(call BuildPackage,triggersad)) |
utils/triggersad/files/triggerhappy-example.conf | ||
---|---|---|
1 | # This is an example configuration for the triggerhappy daemon (thd) | |
2 | # please note that every file to be processed must end in ".conf" | |
3 | # | |
4 | # To view a list of supported event codes, use "thd --listevents" or | |
5 | # "thd --dump /dev/input/event*" | |
6 | # | |
7 | # Format: | |
8 | # <eventcode> <value> <command> | |
9 | # | |
10 | # values for key events are 1 (pressed), 0 (released) or 2 (held) | |
11 | # | |
12 | ## control an mpd instance | |
13 | # KEY_NEXTSONG 1 /usr/bin/mpc next | |
14 | # KEY_PREVSONG 1 /usr/bin/mpc prev |
utils/triggersad/files/triggerhappy.hotplug | ||
---|---|---|
1 | #!/bin/sh | |
2 | THD_SOCKET=/tmp/triggerhappy.socket | |
3 | [ -S "$THD_SOCKET" ] || exit | |
4 | ||
5 | case "$ACTION" in | |
6 | add) | |
7 | DEVICE="/dev/$DEVNAME" | |
8 | [ -c "$DEVICE" ] || exit | |
9 | # offer device to triggerhappy daemon | |
10 | /usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE" | |
11 | ;; | |
12 | remove) | |
13 | # nothing to do | |
14 | ;; | |
15 | esac |
utils/triggersad/files/triggerhappy.init | ||
---|---|---|
1 | #!/bin/sh /etc/rc.common | |
2 | START=93 | |
3 | ||
4 | start() { | |
5 | /usr/sbin/thd --socket /tmp/triggerhappy.socket --triggers /etc/triggerhappy/triggers.d/ --daemon /dev/input/event* | |
6 | } | |
7 | ||
8 | stop() { | |
9 | /usr/sbin/th-cmd --socket /tmp/triggerhappy.socket --quit | |
10 | } |
utils/triggersad/patches/001-input.patch | ||
---|---|---|
1 | diff -ur triggerhappy-0.1.3.orig/Makefile triggerhappy-0.1.3/Makefile | |
2 | --- triggerhappy-0.1.3.orig/Makefile 2010-11-18 11:42:08.402150170 +0300 | |
3 | @@ -23,7 +23,7 @@ | |
4 | --release="" \ | |
5 | $< > $@ | |
6 | ||
7 | -evtable_%.h: /usr/include/linux/input.h | |
8 | +evtable_%.h: $(TOOLCHAIN_DIR)/usr/include/linux/input.h | |
9 | awk '/^#define $*_/ && $$2 !~ /_(MAX|CNT|VERSION)$$/ {print "EV_MAP("$$2"),"}' $< > $@ | |
10 | ||
11 | clean: |