xdriver_x86-input-joystick: Install server config
authorEzequiel García <ezequiel@vanguardiasur.com.ar>
Tue, 12 Apr 2016 22:51:36 +0000 (19:51 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 13 Apr 2016 20:09:49 +0000 (22:09 +0200)
In order for joysticks to be detected and used with this
driver, we need an xorg-server configuration file. This commit
installs such conf file to the default X11 xorg.conf.d path,
so we can at least provide a working template.

Users with specific needs can of course override it.

Signed-off-by: Ezequiel García <ezequiel@vanguardiasur.com.ar>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas:
 - use XDRIVER_XF86_INPUT_JOYSTICK_PKGDIR
 - remove useless empty line.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf [new file with mode: 0644]
package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk

diff --git a/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf b/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf
new file mode 100644 (file)
index 0000000..95a295a
--- /dev/null
@@ -0,0 +1,6 @@
+Section "InputClass"
+       Identifier "joystick catchall"
+       MatchIsJoystick "on"
+       MatchDevicePath "/dev/input/event*"
+       Driver "joystick"
+EndSection
index c63312dd099fadbd871ead0b2f77aa4559d4ade8..2696e2b7d2e37443c6eb2fe0ee032940e29f2442 100644 (file)
@@ -11,4 +11,11 @@ XDRIVER_XF86_INPUT_JOYSTICK_LICENSE = MIT
 XDRIVER_XF86_INPUT_JOYSTICK_LICENSE_FILES = COPYING
 XDRIVER_XF86_INPUT_JOYSTICK_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto
 
+define XDRIVER_XF86_INPUT_JOYSTICK_CONF
+       $(INSTALL) -m 0644 -D \
+               $(XDRIVER_XF86_INPUT_JOYSTICK_PKGDIR)/50-joystick.conf \
+               $(TARGET_DIR)/usr/share/X11/xorg.conf.d/50-joystick.conf
+endef
+XDRIVER_XF86_INPUT_JOYSTICK_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_INPUT_JOYSTICK_CONF
+
 $(eval $(autotools-package))