diff options
-rw-r--r-- | system/steamos-xpad/Makefile | 7 | ||||
-rw-r--r-- | system/steamos-xpad/README | 7 | ||||
-rw-r--r-- | system/steamos-xpad/doinst.sh | 1 | ||||
-rw-r--r-- | system/steamos-xpad/slack-desc | 19 | ||||
-rw-r--r-- | system/steamos-xpad/steamos-xpad.SlackBuild | 76 | ||||
-rw-r--r-- | system/steamos-xpad/steamos-xpad.info | 10 | ||||
-rw-r--r-- | system/steamos-xpad/xpad.conf | 2 |
7 files changed, 122 insertions, 0 deletions
diff --git a/system/steamos-xpad/Makefile b/system/steamos-xpad/Makefile new file mode 100644 index 0000000000..97907b3967 --- /dev/null +++ b/system/steamos-xpad/Makefile @@ -0,0 +1,7 @@ +obj-m = steamos-xpad.o + +KVERSION = $(shell uname -r) +all: + make -C /lib/modules/$(KVERSION)/build V=1 M=$(PWD) modules +clean: + test ! -d /lib/modules/$(KVERSION) || make -C /lib/modules/$(KVERSION)/build V=1 M=$(PWD) clean diff --git a/system/steamos-xpad/README b/system/steamos-xpad/README new file mode 100644 index 0000000000..75bf50be35 --- /dev/null +++ b/system/steamos-xpad/README @@ -0,0 +1,7 @@ +This provides the SteamOS patched version of the kernel xpad driver. It +includes support for newer controllers and fixes a number of issues such +as incorrect button mapping. This driver works for some games where the +stock xpad driver will not. + +This package includes a blacklist for the stock xpad module. +Either reboot or 'rmmod xpad' before using this module. diff --git a/system/steamos-xpad/doinst.sh b/system/steamos-xpad/doinst.sh new file mode 100644 index 0000000000..ae5f58910a --- /dev/null +++ b/system/steamos-xpad/doinst.sh @@ -0,0 +1 @@ +chroot . /sbin/depmod -a @KERNEL@ 2>/dev/null diff --git a/system/steamos-xpad/slack-desc b/system/steamos-xpad/slack-desc new file mode 100644 index 0000000000..a9cefd3e7d --- /dev/null +++ b/system/steamos-xpad/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +steamos-xpad: steamos-xpad (SteamOS patched xpad kernel driver) +steamos-xpad: +steamos-xpad: This provides the SteamOS patched version of the kernels xpad +steamos-xpad: driver. It includes support for newer controllers and fixes a +steamos-xpad: number of issues such as incorrect button mapping. This driver +steamos-xpad: works for some games where the stock xpad driver will not. +steamos-xpad: +steamos-xpad: +steamos-xpad: +steamos-xpad: +steamos-xpad: diff --git a/system/steamos-xpad/steamos-xpad.SlackBuild b/system/steamos-xpad/steamos-xpad.SlackBuild new file mode 100644 index 0000000000..66eebee07a --- /dev/null +++ b/system/steamos-xpad/steamos-xpad.SlackBuild @@ -0,0 +1,76 @@ +#!/bin/sh +# +# Slackware build script for the SteamOS xpad kernel driver +# +# Copyright 2015 Erik W. Hanson, Minneapolis, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=steamos-xpad +VERSION=${VERSION:-f5f73eb} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +KERNEL=$(uname -r) + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +set -ue + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION + +cp $CWD/Makefile $CWD/xpad.c . +sed -e 's/"xpad"/"steamos-xpad"/' xpad.c > steamos-xpad.c + +# Makefile is from the ARCH AUR steamos-xpad-dkms located here: +# https://aur.archlinux.org/packages/steamos-xpad-dkms/ +make + +mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/input/joystick +install -m 0644 steamos-xpad.ko $PKG/lib/modules/$KERNEL/kernel/drivers/input/joystick/ + +mkdir -p $PKG/etc/modprobe.d +install -m 0644 $CWD/xpad.conf $PKG/etc/modprobe.d/ + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a steamos-xpad.c Makefile $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s%@KERNEL@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/steamos-xpad/steamos-xpad.info b/system/steamos-xpad/steamos-xpad.info new file mode 100644 index 0000000000..6979bfe3f1 --- /dev/null +++ b/system/steamos-xpad/steamos-xpad.info @@ -0,0 +1,10 @@ +PRGNAM="steamos-xpad" +VERSION="f5f73eb" +HOMEPAGE="https://github.com/ValveSoftware/steamos_kernel/commits/alchemist-3.10/drivers/input/joystick/xpad.c" +DOWNLOAD="https://raw.githubusercontent.com/ValveSoftware/steamos_kernel/f5f73eb889cac32cbabfc40362fe5635a2255836/drivers/input/joystick/xpad.c" +MD5SUM="6190899029d01846ebb404c9e71e22b7" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Erik Hanson" +EMAIL="erik@slackbuilds.org" diff --git a/system/steamos-xpad/xpad.conf b/system/steamos-xpad/xpad.conf new file mode 100644 index 0000000000..7e00908203 --- /dev/null +++ b/system/steamos-xpad/xpad.conf @@ -0,0 +1,2 @@ +# Blacklist the stock xpad driver in favor of the steamos-xpad version. +blacklist xpad |