# $Id: PKGBUILD 241570 2015-06-30 20:57:10Z arojas $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=ksquares
pkgver=15.04.3
pkgrel=1
pkgdesc="A modeled after the well known pen and paper based game of Dots and Boxes"
url="http://kde.org/applications/games/ksquares/"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kde-applications' 'kdegames')
depends=('libkdegames' 'knotifyconfig')
makedepends=('extra-cmake-modules' 'python' 'kdoctools')
install=${pkgname}.install
conflicts=('kdegames-ksquares')
replaces=('kdegames-ksquares')
source=("http://download.kde.org/stable/applications/${pkgver}/src/ksquares-${pkgver}.tar.xz")
sha1sums=('c8b810841c2b6da17604989b71cdf46808950047')

prepare() {
  mkdir build
}

build() {
  cd build
  cmake ../ksquares-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTING=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
  make
}

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