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

# PKGBUILD script for nato-spell upstream, git version
_pkgname=nato-spell
_pkgver=0.3.1
pkgname=$_pkgname-git
pkgver=0.3.1.r0.g575f3e3
pkgrel=1
pkgdesc="Spelling engine for the NATO phonetic alphabet"
arch=('i686' 'x86_64')
url="https://github.com/Qu4tro/nato-spell"
license=('MIT')
groups=()
depends=('alsa-utils' 'python')
makedepends=('git' 'sed' 'python-setuptools' 'python-poetry')
# optdepends=('***: for that thing *** does')
provides=("$_pkgname")
conflicts=("$_pkgname")
backup=("etc/$_pkgname/$_pkgname.conf")
source=("$_pkgname::git+https://github.com/Qu4tro/nato-spell.git")
md5sums=('SKIP')


prepare() {
  cd "$_pkgname"
  poetry build
  cd dist
  tar -xf "$_pkgname-$_pkgver.tar.gz"
}

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

build() {
  cd "$_pkgname/dist/$_pkgname-$_pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname/dist/$_pkgname-$_pkgver"
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}