# 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.0
pkgrel=3
pkgdesc='Chess client'
arch=(any)
url='http://pychess.org/'
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+https://github.com/$pkgname/$pkgname#tag=$pkgver")
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
}

# getver: raw.githubusercontent.com/pychess/pychess/master/lib/pychess/__init__.py
# vim: ts=2 sw=2 et:
