summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e5ac5d4dc260049bcc5d9ac78bf8ef6c0ac7e548 (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
# Maintainer: lxgr <lxgr@protonmail.com>

pkgbase='pokete-git'
pkgname='pokete-git'
pkgver=0.10.0.rc1.r16.gee70b6f7
pkgrel=1
pkgdesc="A terminal based Pokemon like game"
arch=(any)
url="https://github.com/lxgr-linux/pokete"
license=('GPL-3.0-only')
provides=('pokete')
depends=('python' 'python-scrap_engine' 'alsa-lib')
makedepends=('git' 'go' 'python-yaml' 'git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("$pkgbase"::'git+https://github.com/lxgr-linux/pokete')
md5sums=('SKIP')

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

build() {
  cd "${srcdir}/$pkgbase"
  cd src/pokete/playsound
  echo ":: Building sound module..."
  go build -ldflags "-s -w" -buildmode=c-shared -o ./libplaysound.so
  cd "${srcdir}/$pkgbase"
  echo ":: Building package"
  python -m build --wheel
}

package() {
  cd "${srcdir}/$pkgbase"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/pokete/LICENSE"
}