summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6191a667a3cfc63c4679961c8c78057b90a3280e (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
45
46
47
48
# Maintainer: Parker Reed <parker.l.reed@gmail.com>
# Co-Maintainer: Martin Rys <https://rys.rs/contact> | Toss a coin on https://rys.rs/donate

pkgname=sc-controller-git
pkgver=0.4.9.4.r8.ae6593c
pkgrel=1
pkgdesc='User-mode driver, mapper and GTK3 based GUI for Steam Controller, DS4 and similar controllers.'
arch=('x86_64' 'aarch64')
url='https://github.com/C0rn3j/sc-controller'
license=('GPL-2.0-only')
depends=(
	'gtk3'
	'gtk-layer-shell'
	'libayatana-appindicator'
	'python-cairo'
	'python-evdev'
	'python-gobject'
	'python-ioctl-opt'
	'python-libusb1'
	'python-pylibacl'
	'python-setuptools'
	'python-vdf'
	'xorg-xinput')
makedepends=(
	'git'
	'python-poetry'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}" 'scc')
source=('sc-controller'::'git+https://github.com/C0rn3j/sc-controller.git')
sha256sums=('SKIP')

# This ends up not matching the verison as intended by https://github.com/C0rn3j/sc-controller/pull/30
# so About mismatches pkgver, but it's good enough
pkgver() {
	cd "${srcdir}/${pkgname%-git}"
	printf "%s" "$(git describe --tags --long | sed -e 's/\([^-]*-\)g/r\1/;s/-/./g' -e 's/^v//')"
}

build() {
	cd "${srcdir}/${pkgname%-git}"
	python -m build --wheel
}

package() {
	cd "${srcdir}/${pkgname%-git}"
	python -m installer --destdir="${pkgdir}" dist/*.whl
}