summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8c62abf905e99411d65c672649c7d3d67f08d08e (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: zocker_160 <zocker1600 at posteo dot net>

pkgname=keyboard-center
pkgver=1.0.10
pkgrel=1
pkgdesc="Application to map G-keys on (some) Logitech Gaming Keyboards"
arch=('x86_64')
url="https://github.com/zocker-160/keyboard-center"
license=('GPL3')
depends=(
  'python>=3.10'
  'python-pyqt5>=5.15'
  'python-uinput>=1.0.1'
  'python-ruamel-yaml>=0.15'
  'python-pyusb>=1.0.2'
  'python-setuptools'
  'hidapi>=0.10'
  'libnotify>=0.7.9'
)
optdepends=(
  'openrgb: RGB control for your keyboard'
  'xdotool: type strings for X11'
  'ydotool: type strings using uinput'
  'wtype: type strings for Wayland'
)
makedepends=('git')
source=("$pkgname-$pkgver::git+https://github.com/zocker-160/keyboard-center.git#tag=$pkgver")
sha256sums=('SKIP')

install=keyboard-center.install

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  # nothing to see here
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  # still nothing to see here
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  mkdir -p "$pkgdir/opt/$pkgname"

  cp -r src/assets "$pkgdir/opt/$pkgname"
  cp -r src/config "$pkgdir/opt/$pkgname"
  cp -r src/devices "$pkgdir/opt/$pkgname"
  cp -r src/gui "$pkgdir/opt/$pkgname"
  cp -r src/lib "$pkgdir/opt/$pkgname"

  install -D -m755 linux_packaging/assets/keyboard-center.sh "$pkgdir/usr/bin/$pkgname"

  install -D -m644 src/main.py -t "$pkgdir/opt/$pkgname"
  install -D -m644 src/mainUi.py -t "$pkgdir/opt/$pkgname"
  install -D -m644 src/service.py -t "$pkgdir/opt/$pkgname"
  install -D -m644 src/constants.py -t "$pkgdir/opt/$pkgname"

  install -D -m644 linux_packaging/60-keyboard-center.rules -t "$pkgdir/usr/lib/udev/rules.d"
  install -D -m644 linux_packaging/uinput-keyboard-center.conf "$pkgdir/usr/lib/modules-load.d/$pkgname.conf"

  install -D -m644 linux_packaging/assets/keyboard-center.png -t "$pkgdir/usr/share/icons/hicolor/512x512/apps"
  install -D -m644 linux_packaging/assets/keyboard-center.desktop -t "$pkgdir/usr/share/applications"

  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}