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

pkgname=powerdevil
pkgver=5.3.1
pkgrel=1
pkgdesc='Manages the power consumption settings of a Plasma Shell'
arch=('i686' 'x86_64')
url='https://projects.kde.org/projects/kde/workspace/powerdevil'
license=('LGPL')
depends=('plasma-workspace' 'kidletime')
makedepends=('extra-cmake-modules' 'kdoctools' 'python')
conflicts=('kdebase-workspace')
groups=('plasma')
source=("http://download.kde.org/stable/plasma/${pkgver}/$pkgname-$pkgver.tar.xz")
md5sums=('3f4924bd90fd05605645c49d5a4ed2e5')

prepare() {
  mkdir build
}

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