# $Id: PKGBUILD 227676 2014-12-17 07:50:02Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Antonio Rojas

pkgname=libkscreen-frameworks
pkgver=5.1.2
pkgrel=1
pkgdesc='KDE screen management software'
arch=('i686' 'x86_64')
url='https://projects.kde.org/projects/extragear/libs/libkscreen'
license=('LGPL')
depends=('qt5-x11extras' 'libxrandr')
makedepends=('extra-cmake-modules')
source=("http://download.kde.org/stable/plasma/${pkgver}/libkscreen-$pkgver.tar.xz")
md5sums=('f9e86a4a9985040bfe1abdd09d9b325d')

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../libkscreen-${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
}
