aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e46b2eb5ceacf111ffe1f27e4efb51f956751423 (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
# Maintainer: Xavier Francisco <echo moc.liamg@ocsicnarf.n.reivax | rev>

# PKGBUILD script for nato-spell upstream, git version
_pkgname=nato-spell
pkgname=$_pkgname-git
pkgver=0.3.2.r0.g1d4e830
pkgrel=1
pkgdesc="Spelling engine for the NATO phonetic alphabet"
arch=('any')
url="https://github.com/Qu4tro/nato-spell"
license=('MIT')
depends=('alsa-utils' 'python')
makedepends=('git' 'python-build' 'python-installer' 'python-hatchling')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git+https://github.com/Qu4tro/nato-spell.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_pkgname"
  python -m build --wheel --no-isolation
}

package() {
  cd "$_pkgname"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}