# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk@gmail.com>

pkgname=pychess
pkgver=1.0.3
pkgrel=1
pkgdesc='Chess client'
arch=(any)
url='https://github.com/pychess/pychess'
license=(GPL)
depends=(gst-plugins-base gtksourceview3 python-cairo python-gobject
         python-ptyprocess python-psutil python-sqlalchemy python-pexpect
         python-websockets)
# /usr/bin/spike is mistaken for a chess engine
conflicts=(spike)
makedepends=(git python-pexpect xorg-server-xvfb)
source=("git+$url#commit=0faf9eb9fecc7f26bf92b3549bf17ed12e40fc2f") # tag: 1.0.3
sha256sums=('SKIP')

package() {
  cd pychess

  # Can only be packaged with X available...
  xvfb-run python setup.py install --prefix=/usr --root="$pkgdir"

  # FS#59882
  find "$pkgdir" -wholename 'external/pexpect' -type d -delete
}
