# $Id: PKGBUILD 237581 2015-04-19 15:55:44Z arojas $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Zuf <kontakt.zuf@gmail.com>
# Contributor: Darwin Bautista <djclue917@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=kdenlive
pkgver=15.04.0
pkgrel=1
pkgdesc="A non-linear video editor for Linux using the MLT video framework"
arch=('i686' 'x86_64')
url="http://www.kdenlive.org/"
license=('GPL')
groups=('kde-applications' 'kdemultimedia')
depends=('knewstuff' 'kplotting' 'knotifyconfig' 'mlt' 'glu' 'hicolor-icon-theme')
makedepends=('extra-cmake-modules' 'kdoctools' 'v4l-utils')
optdepends=('ffmpeg: for FFmpeg plugin'
            'cdrkit: for creation of DVD ISO images'
            'dvdauthor: for creation of DVD'
            'dvgrab: for firewire capture'
            'libdv: for webcam capture (if FFmpeg is not installed)'
            'recordmydesktop: for screen capture'
            'xine-ui: for DVD preview')
source=("http://download.kde.org/stable/applications/${pkgver}/src/$pkgname-${pkgver}.tar.xz")
md5sums=('a6b851cec89761334cf2b615c991e17f')
install=$pkgname.install

prepare(){
  mkdir -p 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() {
  make -C build DESTDIR="${pkgdir}" install
}

