summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2e2ba8d824c42e80b4e7f546b0f7261a4ec3f4e9 (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
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>

pkgname=python-pykakasi
pkgver=2.3.0
pkgrel=2
pkgdesc='Lightweight converter from Japanese Kana-kanji sentences into Kana-Roman'
arch=(any)
url='https://codeberg.org/miurahr/pykakasi'
license=('GPL-3.0-or-later')
depends=(
  python
  python-deprecated
  python-jaconv
)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-setuptools-scm
  python-sphinx
  python-wheel
)
source=("git+${url}.git#tag=v${pkgver}")
sha256sums=('d976864bda183f919e9dd70accd2d053d31101450550e54d51ca4f3d786fa696')

build() {
  cd pykakasi

  python -m build --wheel --no-isolation

  make -C docs text
}

package() {
  cd pykakasi

  python -m installer --destdir="${pkgdir}" dist/*.whl

  install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" docs/_build/text/*

  # rename script in /usr/bin to pykakasi in order to avoid conflicts with the kakasi package
  mv "${pkgdir}"/usr/bin/{,py}kakasi
}