summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e5af26b6df6a72e4645c73b163e33003f472014f (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
# Maintainer: jlaunay
# Contributor: Jan Subelj <jan dot subelj010 at gmail dot com>
pkgname=g910-gkeys-git
_appname=g910-gkeys
_gitname=g910-gkey-macro-support
pkgver=0.3.0.r19.g4b1f05e
pkgrel=2
pkgdesc='GKey support for Logitech G910 Keyboard on GNU/Linux'
url='https://github.com/JSubelj/g910-gkey-macro-support'
arch=('any')
license=('GPL3')
depends=('python-pyusb' 'python-uinput')
source=('git+https://github.com/JSubelj/g910-gkey-macro-support.git')
makedepends=('git' 'systemd' 'python-build' 'python-installer' 'python-wheel')
install=${pkgname}.install
backup=("etc/g910-gkeys/config.json" "usr/lib/systemd/user/g910-gkeys.service" "etc/udev/rules.d/60-g910-gkeys.rules" "etc/modules-load.d/uinput-g910-gkeys.conf")
md5sums=('SKIP')

build() {
    cd ${srcdir}/${_gitname}
    python -m build --wheel --no-isolation
}

pkgver() {
  cd "$_gitname"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  cd ${srcdir}/${_gitname}
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 644 -t $pkgdir/usr/lib/systemd/user etc/g910-gkeys.service
  install -Dm 644 -t $pkgdir/etc/udev/rules.d etc/60-g910-gkeys.rules
  install -Dm 644 -t $pkgdir/etc/modules-load.d etc/uinput-g910-gkeys.conf
}