# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=knights
pkgver=2.5.0
pkgrel=2
pkgdesc="Chess board for KDE with XBoard protocol support"
arch=('i686' 'x86_64')
url="http://kde-apps.org/content/show.php/Knights?content=122046"
license=('GPL')
depends=('libkdegames' 'kdebase-runtime')
optdepends=('gnuchess: for playing against the computer')
makedepends=('cmake' 'automoc4')
install=${pkgname}.install
source=("http://dl.dropbox.com/u/2888238/Knights/$pkgname-$pkgver.tar.bz2")
md5sums=('58237998aeee8b6414f6e6f92d070395')

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
