summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordustball2015-07-27 20:26:29 +0200
committerdustball2015-07-27 20:26:29 +0200
commit870bad92db6b0687b58fac9eda8c3e8ee05fe767 (patch)
treeda224fd217154009d19e813cf781d1937a094bf9
downloadaur-870bad92db6b0687b58fac9eda8c3e8ee05fe767.tar.gz
Initial import
-rw-r--r--.SRCINFO25
-rw-r--r--Makefile7
-rw-r--r--PKGBUILD57
-rw-r--r--change-name.patch12
-rw-r--r--steamos-xpad-dkms.dkms7
-rw-r--r--steamos-xpad-dkms.install15
-rw-r--r--xpad.modprobe1
7 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ffa319f9f01f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = steamos-xpad-dkms
+ pkgdesc = xpad kernel module included with Valve's SteamOS
+ pkgver = alchemist.3.10.f5f73eb
+ pkgrel = 1
+ url = https://github.com/ValveSoftware/steamos_kernel
+ install = steamos-xpad-dkms.install
+ arch = any
+ license = GPL2
+ depends = dkms
+ optdepends = linux-headers: Build the module against Arch kernel
+ optdepends = linux-lts-headers: Build the module against LTS Arch kernel
+ conflicts = steamos-xpad
+ source = https://raw.github.com/ValveSoftware/steamos_kernel/f5f73eb889cac32cbabfc40362fe5635a2255836/drivers/input/joystick/xpad.c
+ source = Makefile
+ source = change-name.patch
+ source = steamos-xpad-dkms.dkms
+ source = xpad.modprobe
+ sha512sums = 88553d3efbd76f504c6086652a62f46bbde6ba881edfef453502cae044abfb805e748d5b95b8e5fa25f9b5cbe6c6f0c93602feb254e5ddb5bbf6bf859098bb58
+ sha512sums = 9ca3d1ada29c5bfe3ffd39f818e792be0c528191952660568f0ecae981b191a2cfbfd64a90f1158aa760e38fcd3c52d648cdf0f032fd649512933ca36bcd2149
+ sha512sums = a0ab12a6768447b1798c6d82988fb81a212512dbef19a5e66a5b5c096cbe136671255ad4896226c595d95a97ce097efe6702a370c30cc32d3234750d6a0a5daf
+ sha512sums = 7901fb85689d8670f0d853f19e24b0c22e3913dd82cdb0a83d74f456e010b7dff67575c5be863b43c95f1149780faec5cab604a829cb3e400f1ec44173c35aac
+ sha512sums = f492130c48a37f2fa59447f376c26c8af6581e7d79b2edd5f47afc91dc88d6ce4ccbbf1da1ea286a233bd93a76a785c77259870b617420fd6e1c82bbe3293cfe
+
+pkgname = steamos-xpad-dkms
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..97907b396763
--- /dev/null
+++ b/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/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8c53aa4d62f6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Philipp Richter <richterphilipp.pops@gmail.com>
+
+# git clone https://github.com/ValveSoftware/steamos_kernel.git
+# cd steamos_kernel
+# echo "$(git rev-parse --abbrev-ref HEAD).$(git log -n 1 --pretty=format:%h -- drivers/input/joystick/xpad.c)" | sed 's/-/./g'
+
+_xpadsteamoscommit='f5f73eb889cac32cbabfc40362fe5635a2255836'
+_xpadsteamossha512sum='88553d3efbd76f504c6086652a62f46bbde6ba881edfef453502cae044abfb805e748d5b95b8e5fa25f9b5cbe6c6f0c93602feb254e5ddb5bbf6bf859098bb58'
+
+_pkgbase='steamos-xpad'
+pkgname='steamos-xpad-dkms'
+pkgver='alchemist.3.10.f5f73eb'
+pkgrel='1'
+pkgdesc="xpad kernel module included with Valve's SteamOS"
+arch=('any')
+url='https://github.com/ValveSoftware/steamos_kernel'
+license=('GPL2')
+install="${pkgname}.install"
+depends=('dkms')
+conflicts=("${_pkgbase}")
+optdepends=('linux-headers: Build the module against Arch kernel'
+ 'linux-lts-headers: Build the module against LTS Arch kernel')
+source=("https://raw.github.com/ValveSoftware/steamos_kernel/${_xpadsteamoscommit}/drivers/input/joystick/xpad.c"
+ "Makefile"
+ "change-name.patch"
+ "steamos-xpad-dkms.dkms"
+ "xpad.modprobe")
+sha512sums=("${_xpadsteamossha512sum}"
+ '9ca3d1ada29c5bfe3ffd39f818e792be0c528191952660568f0ecae981b191a2cfbfd64a90f1158aa760e38fcd3c52d648cdf0f032fd649512933ca36bcd2149'
+ 'a0ab12a6768447b1798c6d82988fb81a212512dbef19a5e66a5b5c096cbe136671255ad4896226c595d95a97ce097efe6702a370c30cc32d3234750d6a0a5daf'
+ '7901fb85689d8670f0d853f19e24b0c22e3913dd82cdb0a83d74f456e010b7dff67575c5be863b43c95f1149780faec5cab604a829cb3e400f1ec44173c35aac'
+ 'f492130c48a37f2fa59447f376c26c8af6581e7d79b2edd5f47afc91dc88d6ce4ccbbf1da1ea286a233bd93a76a785c77259870b617420fd6e1c82bbe3293cfe')
+
+prepare() {
+ local _tmpdir="${srcdir}/temp"
+ mkdir "${_tmpdir}"
+ cp -L "${srcdir}/xpad.c" "${_tmpdir}/xpad.c" # we will patch a copy of our source xpad.c
+
+ patch -d "${_tmpdir}" -Np4 -i "${srcdir}/change-name.patch"
+}
+
+package() {
+ local _tmpdir="${srcdir}/temp"
+ install -d "${pkgdir}/usr/src/${_pkgbase}-${pkgver}"
+ install -m 644 -T "${_tmpdir}/xpad.c" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/${_pkgbase}.c"
+ install -m 644 -T "${srcdir}/Makefile" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/Makefile"
+ install -m 644 -T "${srcdir}/steamos-xpad-dkms.dkms" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"
+
+ # Set name and version
+ sed -e "s/@_PKGBASE@/${_pkgbase}/" \
+ -e "s/@PKGVER@/${pkgver}/" \
+ -i "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"
+
+ # Blacklist the original xpad module
+ install -dm755 "${pkgdir}/usr/lib/modprobe.d"
+ install -Dm644 "${srcdir}/xpad.modprobe" "${pkgdir}/usr/lib/modprobe.d/xpad.conf"
+}
diff --git a/change-name.patch b/change-name.patch
new file mode 100644
index 000000000000..f1901b658037
--- /dev/null
+++ b/change-name.patch
@@ -0,0 +1,12 @@
+diff -urN a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
+--- a/drivers/input/joystick/xpad.c 2014-09-04 14:38:45.952097405 +0200
++++ b/drivers/input/joystick/xpad.c 2014-09-04 14:39:49.397822476 +0200
+@@ -1203,7 +1203,7 @@
+ }
+
+ static struct usb_driver xpad_driver = {
+- .name = "xpad",
++ .name = "steamos-xpad",
+ .probe = xpad_probe,
+ .disconnect = xpad_disconnect,
+ .id_table = xpad_table,
diff --git a/steamos-xpad-dkms.dkms b/steamos-xpad-dkms.dkms
new file mode 100644
index 000000000000..394fec26e8ae
--- /dev/null
+++ b/steamos-xpad-dkms.dkms
@@ -0,0 +1,7 @@
+PACKAGE_NAME="@_PKGBASE@"
+PACKAGE_VERSION="@PKGVER@"
+MAKE[0]="make KVERSION=$kernelver"
+CLEAN="make clean"
+BUILT_MODULE_NAME[0]="@_PKGBASE@"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/input/joystick"
+AUTOINSTALL="yes"
diff --git a/steamos-xpad-dkms.install b/steamos-xpad-dkms.install
new file mode 100644
index 000000000000..96f77ca08c1c
--- /dev/null
+++ b/steamos-xpad-dkms.install
@@ -0,0 +1,15 @@
+post_install() {
+ dkms install steamos-xpad/${1%%-*}
+}
+
+pre_upgrade() {
+ pre_remove ${2%%-*}
+}
+
+post_upgrade() {
+ post_install ${1%%-*}
+}
+
+pre_remove() {
+ dkms remove steamos-xpad/${1%%-*} --all
+}
diff --git a/xpad.modprobe b/xpad.modprobe
new file mode 100644
index 000000000000..76f498f1dcfe
--- /dev/null
+++ b/xpad.modprobe
@@ -0,0 +1 @@
+blacklist xpad