summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5c7248a1c30b499a1cd7cd8361aedead055f7042 (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.dev10+115.gc75215e
pkgrel=2
arch=('any')
license=('GPL2')
depends=(
  'python'
  'python-appdirs'
  'python-dbus'
  'python-plover_stroke'
  'python-pyqt5'
  'python-pyserial'
  'python-rtf_tokenize'
  'python-setuptools'
  'python-wcwidth'
  'python-xlib'
  'qt5-svg'
)
makedepends=(
  'git'
  'python-babel'
  'python-build'
  'python-install'
  'python-pytest'
  'python-pytest-qt'
  'python-pytest-xvfb'
)
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 test
}

package() {
  cd "$pkgname"
  python -m install --destdir="$pkgdir" --optimize=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"
  # Workaround `python-install` bug: console scripts missing execute permissions...
  chmod +x "$pkgdir/usr/bin"/*
}

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