# $Id: PKGBUILD 68873 2012-04-04 13:26:02Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>

pkgname=pychess
pkgver=0.10.1
pkgrel=2
pkgdesc="Chess client for the GNOME desktop"
arch=('any')
url="http://pychess.org/"
license=('GPL')
depends=('python-pysqlite' 'gnome-icon-theme' 'python-rsvg'
         'pygtksourceview2' 'gstreamer0.10-python')
install=pychess.install
source=(http://pychess.googlecode.com/files/pychess-$pkgver.tar.gz)
md5sums=('ee1893071823b3d41ecdb1ef314fb8ba')

package() {
  cd $srcdir/pychess-$pkgver

  sed -i "s|#!/usr/bin/python$|#!/usr/bin/python2|" lib/pychess/Players/PyChess.py
  sed -i "/vm binname/s|python|python2|" lib/pychess/Players/engineNest.py
  sed -i "/binname ==/s|python|python2|" lib/pychess/widgets/newGameDialog.py

  python2 setup.py install --prefix=/usr --root=$pkgdir
}
