# $Id: PKGBUILD 233155 2015-03-10 07:37:17Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=gwenview
pkgver=14.12.3
pkgrel=1
pkgdesc="A fast and easy to use image viewer for KDE"
url='http://kde.org/applications/graphics/gwenview/'
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdegraphics')
depends=('kded' 'kactivities-frameworks' 'baloo-frameworks')
optdepends=('qt5-imageformats: support for tiff, webp, and more image formats'
            'kimageformats: support for dds, xcf, exr, psd, and more image formats')
makedepends=('extra-cmake-modules' 'git' 'kdoctools' 'python')
replaces=('kdegraphics-gwenview')
conflicts=('kdegraphics-gwenview')
install=$pkgname.install
source=("http://download.kde.org/stable/applications/${pkgver}/src/gwenview-${pkgver}.tar.xz")
sha1sums=('c31ced401d5f78ba8de4f58e03185c348f737a66')

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 \
    -DGWENVIEW_SEMANTICINFO_BACKEND="Baloo" \
    -DBUILD_TESTING=OFF
  make
}

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