summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8221c5f58d6480d329f95805ff4da8adce9cb70e (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
# Maintainer: Benoit Pierre <benoit.pierre@gmail.com>

pkgname=plover-git
pkgdesc="Free and open source real-time stenography engine."
pkgver=4.0.0.dev12
pkgrel=1
arch=('any')
license=('GPL2')
depends=(
  'dbus'
  'python'
  'python-appdirs'
  'python-plover_stroke>=1.1.0'
  'python-pyqt5'
  'python-pyserial'
  'python-rtf_tokenize'
  'python-setuptools'
  'python-wcwidth'
  'python-xlib'
  'qt5-svg'
)
makedepends=(
  'git'
  'python-babel'
  'python-build'
  'python-installer'
  'python-mock'
  'python-pytest'
  'python-pytest-qt'
  'python-pytest-xvfb'
  'python-wheel'
)
provides=('plover')
conflicts=('plover')
url="http://www.openstenoproject.org/plover/"
source=($pkgname::git+https://github.com/openstenoproject/plover.git)
sha1sums=(SKIP)

pkgver() {
  cd "$pkgname"
  python setup.py --quiet patch_version
  python setup.py --version
}

prepare() {
  cd "$pkgname"
  # Use the distributions' main entry point, so plugins are isolated.
  sed -i 's/^\(\s*plover = plover.\)main:main$/\1dist_main:main/' setup.cfg
}

build() {
  cd "$pkgname"
  pyproject-build --no-isolation --skip-dependency-check --wheel
}

check() {
  cd "$pkgname"
  PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -p pytest-qt -p xvfb test
}

package() {
  cd "$pkgname"
  python -m installer --destdir="$pkgdir" --compile-bytecode=1 dist/*.whl
  install -vDm644 -t "${pkgdir}/usr/share/pixmaps" plover/assets/plover.png
  install -vDm644 -t "${pkgdir}/usr/share/applications" linux/plover.desktop
  chmod og+rX -R "$pkgdir"
}

# vim:set sw=2 sts=2 et: