Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=b833c7db959d9a70d975037962f49e03058e7dcf
commit b833c7db959d9a70d975037962f49e03058e7dcf Author: James Buren <[EMAIL PROTECTED]> Date: Wed Oct 1 20:54:56 2008 -0500 kbstick-0.80-1-i686 * new package diff --git a/source/xapps-extra/kbstick/FrugalBuild b/source/xapps-extra/kbstick/FrugalBuild new file mode 100644 index 0000000..4b4f343 --- /dev/null +++ b/source/xapps-extra/kbstick/FrugalBuild @@ -0,0 +1,30 @@ +# Compiling Time: 0.01 SBU +# Maintainer: James Buren <[EMAIL PROTECTED]> + +pkgname=kbstick +pkgver=0.80 +pkgrel=1 +pkgdesc="A tool for converting joystick events to keyboard events." +url="http://www.ditch.org/kbstick/" +depends=('libxtst' 'glibc') +groups=('xapps-extra') +archs=('i686' 'x86_64') +up2date="lynx -dump '$url' | grep 'Version ' | head -n1 | sed 's|^.*Version \(.*\) p.*$|\1|'" +source=($url/qstick.tar.gz $pkgname.conf $pkgname) +options=('nodocs') +backup=("etc/$pkgname.conf") +sha1sums=('33a1009bf0ae6587fff7b7d54976a9bb69bd0d0b' \ + '57c869da6b7127860c95ad22baba3d85061229c1' \ + '5fef37615702de1e28f1f378c9ea3b49b500950e') + +build() +{ + Fsed "-I/usr/X11R6/include" "-I/usr/X11R6/include ${CFLAGS}" Makefile + Fmake + Ffile /etc/$pkgname.conf + Fexerel $pkgname /usr/bin/$pkgname-bin + Fexe /usr/bin/$pkgname + Fdocrel CREDITS +} + +# optimization OK diff --git a/source/xapps-extra/kbstick/README.Frugalware b/source/xapps-extra/kbstick/README.Frugalware new file mode 100644 index 0000000..3b7e9fb --- /dev/null +++ b/source/xapps-extra/kbstick/README.Frugalware @@ -0,0 +1,9 @@ +If you do not know the keycodes for the keys you wish to remap the joystick events +to, then please install the xev program. It will help you to identify them. Moving +on, the /etc/kbstick.conf is the system level configuration file the shell script +reads from if the user does not have a .kbstickrc in their home directory. Syntax +is the same in both cases, and the configuration file has some comments to give you +an idea of what each variable does. I have set the default up/down/left/right key +mappings to what my laptop uses for them and the buttons will have to be manually +defined to their proper keycodes. If you need any further help, please email the +maintainer of this package. diff --git a/source/xapps-extra/kbstick/kbstick b/source/xapps-extra/kbstick/kbstick new file mode 100644 index 0000000..686a569 --- /dev/null +++ b/source/xapps-extra/kbstick/kbstick @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ -f "$HOME/.kbstickrc" ]; then + source "$HOME/.kbstickrc" +else + source "/etc/kbstick.conf" +fi + +exec /usr/bin/kbstick-bin "${KBS_Joystick}" & diff --git a/source/xapps-extra/kbstick/kbstick.conf b/source/xapps-extra/kbstick/kbstick.conf new file mode 100644 index 0000000..563e96e --- /dev/null +++ b/source/xapps-extra/kbstick/kbstick.conf @@ -0,0 +1,103 @@ +# Assign X KeyCodes to shell variables. This is small number of the +# X keyboard KeyCodes (corresponding to the keypad keys). +# +X_UP="98" +X_DOWN="104" +X_LEFT="100" +X_RIGHT="102" +X_BUTTON_0="" +X_BUTTON_1="" +X_BUTTON_2="" +X_BUTTON_3="" +X_BUTTON_4="" +X_BUTTON_5="" +X_BUTTON_6="" +X_BUTTON_7="" +X_BUTTON_8="" +X_BUTTON_9="" +X_BUTTON_10="" +X_BUTTON_11="" + +# Assign KeyCodes to the joystick axes. +# Axes 0 and 1 should be the x (horizontal) and y (vertical) axes of the +# stick itself. Axes beyond these will correspond to rudder, throttle, etc. +# controls. +# KBStick supports up to 6 axes, though altering the source code +# to support more would be a trivial exercise. +# +# *If you un-comment any of these be sure to un-comment the exports below.* +# +KBS_Axis_0_Plus="${X_RIGHT}" +KBS_Axis_1_Plus="${X_DOWN}" +#KBS_Axis_2_Plus= +#KBS_Axis_3_Plus= +#KBS_Axis_4_Plus= +#KBS_Axis_5_Plus= +KBS_Axis_0_Minus="${X_LEFT}" +KBS_Axis_1_Minus="${X_UP}" +#KBS_Axis_2_Minus= +#KBS_Axis_3_Minus= +#KBS_Axis_4_Minus= +#KBS_Axis_5_Minus= + +# Assign KeyCodes to the joystick buttons. +# Location and order of buttons/button number will vary from joystick to +# joystick. Choosing the KeyCodes of unused keyboard keys to assign to +# joystick buttons makes moot the matter of which button sends which KeyCode +# since one can run QStick and _then_ run and configure the games you wish +# to play, rather than configuring the games first then trying to match +# button messages to your game configuration. +# KBStick supports up to 12 joystick buttons, but once again altering the +# source code to allow more would be a minor task. +# +KBS_Button_0="${X_BUTTON_0}" +KBS_Button_1="${X_BUTTON_1}" +KBS_Button_2="${X_BUTTON_2}" +KBS_Button_3="${X_BUTTON_3}" +KBS_Button_4="${X_BUTTON_4}" +KBS_Button_5="${X_BUTTON_5}" +KBS_Button_6="${X_BUTTON_6}" +KBS_Button_7="${X_BUTTON_7}" +KBS_Button_8="${X_BUTTON_8}" +KBS_Button_9="${X_BUTTON_9}" +KBS_Button_10="${X_BUTTON_10}" +KBS_Button_11="${X_BUTTON_11}" + +# Assign a quit button. +# Setting the environment variable KBS_Quit_Button makes the assigned button +# (actually any button that sends the assigned KeyCode) cause the KBStick program +# to exit after 3 consecutive quit button presses. Any other button press resets +# the quit count to 0, but it would probably be good to choose a seldom +# used button to be the quit button lest in the fever of a Deathmatch you +# turn off your joystick support. B) +# Though KBStick issues a warning if you don't you need not assign a quit +# key at all. +# + +#KBS_Quit_Button="${KBS_Button_7}" + + +# Assign the device node where your joystick is located. +# Usually, this is /dev/input/js0. + +KBS_Joystick="/dev/input/js0" + +# Assign a Dead Zone around the center all your joystick axes. +# This is really better done with a calibrator like jscal from the +# Linux Joystick Driver distribution. +# +#export KBS_Dead_Zone=500 + +# Export the shell variables to the environment... +# +export KBS_Axis_0_Plus KBS_Axis_1_Plus +#export KBS_Axis_2_Plus KBS_Axis_3_Plus +#export KBS_Axis_4_Plus KBS_Axis_5_Plus +export KBS_Axis_0_Minus KBS_Axis_1_Minus +#export KBS_Axis_2_Minus KBS_Axis_3_Minus +#export KBS_Axis_4_Minus KBS_Axis_5_Minus + +export KBS_Button_0 KBS_Button_1 KBS_Button_2 KBS_Button_3 +export KBS_Button_4 KBS_Button_5 KBS_Button_6 KBS_Button_7 +export KBS_Button_8 KBS_Button_9 KBS_Button_10 KBS_Button_11 +#export KBS_Quit_Button _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
