summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78944e2d9d05ec503609b77683ff5a2b266eb855 (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
68
69
70
71
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Arnaud Taffanel <dev@taffanel.org>
# Contributor: Victor Häggqvist <aur a snilius d com>

pkgname=solaar-git
pkgver=1.1.12.r3.g704a8769
pkgrel=1
pkgdesc="Linux device manager for a wide range of Logitech devices"
url="https://pwr-solaar.github.io/Solaar/"
_url="https://github.com/pwr-Solaar/Solaar"
license=(GPL-2.0-or-later)
arch=(any)
depends=(
  glib2
  gobject-introspection-runtime
  gtk3
  hicolor-icon-theme
  libnotify
  python
  python-dbus
  python-evdev
  python-gobject
  python-psutil
  python-pyudev
  python-xlib
  python-yaml
)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-wheel
)
optdepends=('libayatana-appindicator: Display tray icon')

provides=("solaar" "python-hid-parser")
conflicts=("solaar" "python-hid-parser")
replaces=("python-hid-parser")

source=(
  "${pkgname}::git+https://github.com/pwr-Solaar/Solaar.git"
)
sha512sums=('SKIP')

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

prepare() {
  cd $pkgname
  tools/po-compile.sh
}

build() {
  cd $pkgname
  python -m build --wheel --no-isolation
}

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

  # udev
  rm -rf "$pkgdir/etc"
  install -vDm 644 rules.d/42-logitech-unify-permissions.rules -t "$pkgdir/usr/lib/udev/rules.d/"
  # docs
  install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
# vim:set ts=2 sw=2 et: