summaryrefslogtreecommitdiff
path: root/packaging/arch/PKGBUILD
blob: 155cdc9e5a3ffa3b52a2848fb452655edd5520ca (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
# Maintainer: Yuval Adam <hello@yuv.al>
pkgname=parley
pkgver=1.0.0
pkgrel=1
pkgdesc='Private dictation for modern Linux'
arch=('any')
url='https://github.com/yuvadm/parley'
license=('GPL-3.0-or-later')
depends=(
  'ffmpeg'
  'gnome-shell'
  'ibus'
  'libnotify'
  'python'
  'python-gobject'
  'xclip'
  'xdg-utils'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
optdepends=(
  'transcribe-cli: Parakeet transcription runtime (may also be installed manually)'
)
source=("$pkgname::git+$url.git#branch=main")
sha256sums=('SKIP')

prepare() {
  git -C "$srcdir/$pkgname" clean -dfx
}

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

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

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 data/systemd/parley.service \
    "$pkgdir/usr/lib/systemd/user/parley.service"
  install -Dm644 data/dbus/org.parley.Transcription1.service \
    "$pkgdir/usr/share/dbus-1/services/org.parley.Transcription1.service"
  install -Dm644 parley/interfaces/org.parley.Transcription1.xml \
    "$pkgdir/usr/share/dbus-1/interfaces/org.parley.Transcription1.xml"

  local extension_dir="$pkgdir/usr/share/gnome-shell/extensions/parley@org.parley"
  install -Dm644 extension/metadata.json "$extension_dir/metadata.json"
  install -Dm644 extension/extension.js "$extension_dir/extension.js"
  install -Dm644 extension/stylesheet.css "$extension_dir/stylesheet.css"
}