summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9483fbe49c141087ae39acf77e4ae7e21bba9393 (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
72
# Maintainer: Anton Karmanov <a.karmanov@inventati.org>

pkgname=simsapa
pkgver='0.5.2_alpha.1'
pkgrel=1
_projver="${pkgver/_/-}"
pkgdesc='A sutta reader and Pali dictionary application'
arch=(any)
url='https://simsapa.github.io'
license=('GPL-3.0-only')
depends=(
  'python-alembic'
  'python-beautifulsoup4'
  'python-blessed'
  'python-bokeh'
  'python-deepmerge'
  'python-dotenv'
  'python-ebooklib'
  'python-epub_meta'
  'python-flask'
  'python-flask-cors'
  'python-idzip'
  'python-markdown'
  'python-networkx'
  'python-openai'
  'python-platformdirs'
  'python-psutil'
  'python-pyperclip'
  'python-pyqt6'
  'python-pyqt6-webengine'
  'python-requests'
  'python-semver'
  'python-sqlalchemy-git>=2.0.22'  # TODO Should depends on non-git pkg
  'python-sqlalchemy-utils'
  'python-tantivy-py-simsapa'
  'python-tiktoken'
  'python-tomlkit'
  'python-typer'
  'python-urllib3'
  'python>=3.11'
)

optdepends=('calibre: export to MOBI')
makedepends=(
  'pyinstaller-hooks-contrib'
  'python-build'
  'python-installer'
  'python-wheel')
_src_url="${pkgname}-${pkgver}.tar.gz::"
_src_url="${_src_url}https://github.com/simsapa/${pkgname}/archive/refs/tags/"
_src_url="${_src_url}v${_projver}.tar.gz"
source=("$_src_url" "io.github.${pkgname}.desktop")
sha256sums=(
  '82fb27c3bfcc00e8dbdceefcd71463e1f37326cba2110a4fb1f87ca95bb534b5'
  '362eb4118ca2d48b5764ab836f83291be877773f23406220a56ef7d7b88efa0c'
)

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

package() {
  cd "${srcdir}/${pkgname}-${_projver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install \
    -Dm644 simsapa/assets/icons/appicons/simsapa.png \
    -t "$pkgdir/usr/share/icons/hicolor/256x256/apps/"
  install \
    -Dm644 "${srcdir}/io.github.simsapa.desktop" \
    -t "$pkgdir/usr/share/applications/"
}