Skip to content

Commit

Permalink
custom handygccs-git
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Sep 8, 2023
1 parent 40b3dea commit dde73ce
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
1 change: 0 additions & 1 deletion manifest
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export AUR_PACKAGES="\
frzr \
gamescope-plus \
gamescope-session-git \
handygccs-git \
hhfc-git \
legendary \
lib32-gamescope-plus \
Expand Down
42 changes: 42 additions & 0 deletions pkgs/handygccs-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Maintainer: Derek J. Clark <[email protected]>
pkgname=handygccs-git
_gitdir=HandyGCCS
pkgver=23.09.r171.fcd9606
pkgrel=1
pkgdesc="Handheld Game Console Controller Support."
arch=('any')
url="https://github.com/ShadowBlip/HandyGCCS"
license=('GPL')
groups=()
depends=('python' 'python-evdev')
optdepends=()
makedepends=('git' 'python' 'python-evdev' 'python-installer' 'python-build'
'python-wheel' 'python-setuptools')
_tag=fcd9606b8921ca86a0250ac6171d9423de478677
source=("${_gitdir}::git+https://github.com/ShadowBlip/${_gitdir}.git#tag=${_tag}")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/${_gitdir}"
printf "%s.r%s.%s" $(date '+%y.%m') "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
cd "$srcdir/${_gitdir}"
sed -i "s/product=0x028e/product=0x02ea/" src/handycon/devices.py
sed -i "s/version=0x110/version=0x301/" src/handycon/devices.py
python -m build --wheel --no-isolation
}

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

mkdir -p ${pkgdir}/usr/lib/systemd/system
install -m644 usr/lib/systemd/system/handycon.service ${pkgdir}/usr/lib/systemd/system

mkdir -p ${pkgdir}/usr/lib/udev/hwdb.d
install -m644 usr/lib/udev/hwdb.d/59-handygccs-ayaneo.hwdb ${pkgdir}/usr/lib/udev/hwdb.d

mkdir -p ${pkgdir}/usr/lib/udev/rules.d
install -m644 usr/lib/udev/rules.d/60-handycon.rules ${pkgdir}/usr/lib/udev/rules.d
}

0 comments on commit dde73ce

Please sign in to comment.