# $Id: PKGBUILD 239792 2015-05-26 09:45:53Z arojas $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Antonio Rojas <arojas@archlinux.org>

pkgname=kscreen
pkgver=5.3.1
pkgrel=1
pkgdesc="KDE's screen management software"
arch=('i686' 'x86_64')
url='https://projects.kde.org/projects/kde/workspace/kscreen'
license=('LGPL')
depends=('kxmlgui' 'libkscreen' 'qt5-graphicaleffects')
makedepends=('extra-cmake-modules' 'python')
conflicts=('kscreen-frameworks')
replaces=('kscreen-frameworks')
groups=('plasma')
install=$pkgname.install
source=("http://download.kde.org/stable/plasma/${pkgver}/kscreen-$pkgver.tar.xz")
md5sums=('f03f06c9c640d3a6288f345de2e82275')

prepare() {
  mkdir build
}

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

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