# $Id: PKGBUILD 137898 2015-08-04 06:37:11Z bpiotrowski $
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Gilles CHAUVIN <gcnweb ][ gmail ? com>
# Contributor: Jonathan Schaeffer <joschaeffer ][ gmail ? com>
# Contributor: chfoxli <lg ][ romandie ? com>

pkgname=kphotoalbum
pkgver=4.6.2
pkgrel=2
pkgdesc="KDE Photo Album, picture collection manager"
url="http://www.kphotoalbum.org/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('kdebase-runtime' 'libkipi' 'libkdcraw' 'libkface' 'libkgeomap')
makedepends=('cmake' 'automoc4' 'kdeedu-marble' 'kdemultimedia-mplayerthumbs')
optdepends=('kdeedu-marble: integration with Marble'
	'kipi-plugins: add extra functionality'
	'kdemultimedia-mplayerthumbs: video thumbnails')
install=${pkgname}.install
source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz")
sha256sums=('54c256a1943a632f7ff68126dc985e7f434e7b18c762ae40a49181b9d85f34fb')

build() {
# workaround build failure
  mv $pkgname-$pkgver $pkgname

  mkdir build
  cd build

  cmake ../${pkgname} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd ${srcdir}/build

  make DESTDIR=${pkgdir} install
}
