buildroot: add input-tools package (evtest, inputattach, jscal, jstest)
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 6 Apr 2008 19:59:21 +0000 (19:59 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 6 Apr 2008 19:59:21 +0000 (19:59 -0000)
package/Config.in
package/input-tools/Config.in [new file with mode: 0644]
package/input-tools/input-tools.mk [new file with mode: 0644]

index bfb91bda803636749c0711edad2b0e16021c62da..42efb2147c2d3b4dacfc652ce4a259b1af536965 100644 (file)
@@ -240,6 +240,7 @@ source "package/hdparm/Config.in"
 source "package/hotplug/Config.in"
 endif
 source "package/hwdata/Config.in"
+source "package/input-tools/Config.in"
 source "package/iostat/Config.in"
 source "package/libaio/Config.in"
 source "package/libraw1394/Config.in"
diff --git a/package/input-tools/Config.in b/package/input-tools/Config.in
new file mode 100644 (file)
index 0000000..64a07a3
--- /dev/null
@@ -0,0 +1,34 @@
+config BR2_PACKAGE_INPUT_TOOLS
+       bool "input-tools"
+       default n
+       help
+         Tools for the Linux kernel input layer.
+         http://linuxconsole.sourceforge.net/
+
+config BR2_PACKAGE_INPUT_TOOLS_EVTEST
+        bool "evtest"
+        depends on BR2_PACKAGE_INPUT_TOOLS
+        default y
+        help
+         Input event interface test program.
+
+config BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH
+        bool "inputattach"
+        depends on BR2_PACKAGE_INPUT_TOOLS
+        default y
+        help
+         Inputattach is used for attaching a serial line to the input layer.
+
+config BR2_PACKAGE_INPUT_TOOLS_JSCAL
+        bool "jscal"
+        depends on BR2_PACKAGE_INPUT_TOOLS
+        default y
+        help
+         Joystick calibration program.
+
+config BR2_PACKAGE_INPUT_TOOLS_JSTEST
+        bool "jstest"
+        depends on BR2_PACKAGE_INPUT_TOOLS
+        default y
+        help
+         Joystick test program.
diff --git a/package/input-tools/input-tools.mk b/package/input-tools/input-tools.mk
new file mode 100644 (file)
index 0000000..bbac23e
--- /dev/null
@@ -0,0 +1,66 @@
+#############################################################
+#
+# input-tools
+#
+#############################################################
+
+INPUT_TOOLS_VERSION:=20051019
+INPUT_TOOLS_SOURCE:=joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz
+INPUT_TOOLS_PATCH:=joystick_$(INPUT_TOOLS_VERSION)-1.1.diff.gz
+INPUT_TOOLS_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/j/joystick/
+INPUT_TOOLS_DIR:=$(BUILD_DIR)/joystick-$(INPUT_TOOLS_VERSION).orig
+INPUT_TOOLS_CAT:=$(ZCAT)
+
+INPUT_TOOLS_TARGETS-y:=
+
+INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_EVTEST) += evtest
+INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach
+INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal
+INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest
+
+INPUT_TOOLS_TARGETS := $(addprefix $(TARGET_DIR)/usr/bin/, $(INPUT_TOOLS_TARGETS-y))
+INPUT_TOOLS_SOURCES := $(addprefix $(INPUT_TOOLS_DIR)/utils/, \
+       $(addsuffix .c, $(INPUT_TOOLS_TARGETS-y)))
+
+$(DL_DIR)/$(INPUT_TOOLS_SOURCE):
+       $(WGET) -P $(DL_DIR) $(INPUT_TOOLS_SITE)/$(@F)
+
+$(DL_DIR)/$(INPUT_TOOLS_PATCH):
+       $(WGET) -P $(DL_DIR) $(INPUT_TOOLS_SITE)/$(@F)
+
+$(INPUT_TOOLS_DIR)/.unpacked: $(DL_DIR)/$(INPUT_TOOLS_SOURCE) $(DL_DIR)/$(INPUT_TOOLS_PATCH)
+       $(INPUT_TOOLS_CAT) $(DL_DIR)/$(INPUT_TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ifneq ($(INPUT_TOOLS_PATCH),)
+       (cd $(INPUT_TOOLS_DIR) && $(INPUT_TOOLS_CAT) $(DL_DIR)/$(INPUT_TOOLS_PATCH) | patch -p1)
+endif
+       toolchain/patch-kernel.sh $(INPUT_TOOLS_DIR) package/input-tools/ \*.patch
+       touch $@
+
+$(INPUT_TOOLS_SOURCES): $(INPUT_TOOLS_DIR)/.unpacked
+
+$(INPUT_TOOLS_DIR)/utils/%: $(INPUT_TOOLS_DIR)/utils/%.c
+       $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^
+
+$(INPUT_TOOLS_TARGETS): $(TARGET_DIR)/usr/bin/%: $(INPUT_TOOLS_DIR)/utils/%
+       cp -dpf $^ $@
+       $(STRIPCMD) $(STRIP_STRIP_ALL) $@
+
+input-tools: uclibc $(INPUT_TOOLS_TARGETS)
+
+input-tools-source: $(DL_DIR)/$(INPUT_TOOLS_SOURCE) $(DL_DIR)/$(INPUT_TOOLS_PATCH)
+
+input-tools-unpacked: $(INPUT_TOOLS_DIR)/.unpacked
+
+input-tools-clean:
+       rm -f $(INPUT_TOOLS_TARGETS)
+
+input-tools-dirclean:
+       rm -rf $(INPUT_TOOLS_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_INPUT_TOOLS)),y)
+TARGETS+=input-tools
+endif