# $Id: PKGBUILD 375650 2018-08-30 18:23:59Z ffy00 $
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Philipp Wolfer <ph.wolfer@gmail.com>

pkgname=peek
pkgver=1.3.1
pkgrel=3
pkgdesc="Simple screen recorder with an easy to use interface"
arch=('x86_64')
url="https://github.com/phw/peek"
license=('GPL3')
depends=('gtk3' 'libkeybinder3' 'ffmpeg')
makedepends=('cmake' 'vala' 'gst-plugins-good' 'gst-plugins-ugly')
#checkdepends=('xorg-server-xvfb')
optdepends=('gst-plugins-good: Recording under Gnome Shell'
            'gst-plugins-ugly: MP4 output under Gnome Shell'
            'gifski: High quality GIF animations with thousands of colors')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('cdf4190c555b0a40051862038c04dc7c164bf8bccf47202d0fcb74f527a8a7d5605bc2e112847e262e51a5a95c3d2b3497e4ec56834880564e8e4127869ad9df')

build() {
  mkdir -p $pkgname-$pkgver/build
  cd $pkgname-$pkgver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTS=OFF \
    -DGSETTINGS_COMPILE=ON \
    -DENABLE_FILECHOOSERNATIVE=ON

  make
}

#check() {
#  cd $pkgname-$pkgver/build
#
#  xvfb-run make test
#}

package() {
  cd $pkgname-$pkgver/build

  make DESTDIR="$pkgdir" install
}

