summaryrefslogtreecommitdiff
path: root/pcr/python-steamcontroller-git/PKGBUILD
blob: 1c9a4c409dc724742e48e1d177895c36ea21e4bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor (Arch): vorpalblade77@gmail.com
pkgname=python-steamcontroller-git
_pkgname=steamcontroller
pkgver=r92.71cb09c
_gitver=71cb09c9dd4e0d6dfd61a109562f24e5aea58517
pkgrel=1
pkgdesc="Standalone userland driver for the Steam controller"
arch=('i686' 'x86_64')
url="https://github.com/ynsta/${_pkgname}"
license=('MIT')
makedepends=('git' 'python-distutils-extra' 'python-setuptools')
depends=('python-libusb1')
optdepends=('python-pyside: Required for sc-gyro-plot.py'
	    'python-pyqtgraph: Required for sc-gyro-plot.py')
provides=('steamcontroller')
conflicts=("${_pkgname}")
changelog='changelog.txt'
source=("${_pkgname}-${pkgver}::git+https://github.com/ynsta/${_pkgname}.git/#commit=$_gitver"
        '80-steam-controller-permission.rules')
sha256sums=('SKIP'
            'ab6efa7c0aaf408f51eee8e1d83ec07004730848bdef3ab9e091847fb915f240')
install='steamcontroller.install'

pkgver() {
	cd "${_pkgname}-${pkgver}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${_pkgname}-${pkgver}"
	python setup.py build
}

package() {
	cd "${_pkgname}-${pkgver}"
	install -m755 -d "${pkgdir}/usr/lib/udev/rules.d"
	install -Dm 644 "${srcdir}/80-steam-controller-permission.rules" \
	  "${pkgdir}/usr/lib/udev/rules.d/80-steam-controller-permission.rules"
	python setup.py install --root="${pkgdir}" \
	--prefix="/usr" \
	--compile -O1
	install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}