# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: 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=19.08.1
pkgrel=1
pkgdesc="A non-linear video editor for Linux using the MLT video framework"
arch=(x86_64)
url="https://www.kdenlive.org/"
license=(GPL)
groups=(kde-applications kdemultimedia)
depends=(knewstuff knotifyconfig kfilemetadata purpose mlt rttr breeze-icons frei0r-plugins)
makedepends=(extra-cmake-modules kdoctools v4l-utils)
optdepends=('ffmpeg: for FFmpeg plugin'
            'cdrtools: for creation of DVD ISO images'
            'dvdauthor: for creation of DVD'
            'dvgrab: for firewire capture'
            'recordmydesktop: for screen capture'
            'xine-ui: for DVD preview'
            'vlc: for DVD preview'
            'plasma-desktop: theme configuration')
source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('0d19c0d24e16518fd3b57eddffeb7d004723942889bd62e869749f02a1dcc036'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  make
}

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