# $Id: PKGBUILD 237622 2015-04-19 15:56:56Z arojas $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=filelight
pkgver=15.04.0
pkgrel=1
pkgdesc='View disk usage information'
url='http://kde.org/applications/utilities/filelight'
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
depends=('kparts')
makedepends=('extra-cmake-modules' 'kdoctools' 'python')
groups=('kde-applications' 'kdeutils')
replaces=('kdeutils-filelight')
conflicts=('kdeutils-filelight')
install=${pkgname}.install
source=("http://download.kde.org/stable/applications/${pkgver}/src/filelight-${pkgver}.tar.xz")
sha1sums=('9070e51ee3b385fbb1647991740f798cd548fa3f')

prepare() {
  mkdir -p build
}

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