# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jan Jezek <honzin.jezek@gmail.com>

pkgname=tumbler
pkgver=4.16.0
pkgrel=3
pkgdesc="D-Bus service for applications to request thumbnails"
arch=('x86_64')
url="https://docs.xfce.org/xfce/tumbler/start"
license=('GPL2' 'LGPL')
groups=('xfce4')
depends=('gdk-pixbuf2')
makedepends=('intltool' 'python' 'ffmpegthumbnailer' 'poppler-glib' 'libgsf'
             'libgepub' 'libopenraw' 'freetype2')
optdepends=('ffmpegthumbnailer: video thumbnails'
            'poppler-glib: PDF thumbnails'
            'libgsf: ODF thumbnails'
            'libgepub: EPUB thumbnails'
            'libopenraw: RAW thumbnails'
            'freetype2: font thumbnails')
backup=('etc/xdg/tumbler/tumbler.rc')
source=(https://archive.xfce.org/src/xfce/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2)
sha256sums=('9b0b7fed0c64041733d490b1b307297984629d0dd85369749617a8766850af66')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  # Fix build with libopenraw 0.3
  sed -i 's|libopenraw-gnome-0.1|libopenraw-gnome-0.3|' configure
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib/xfce4 \
    --disable-static \
    --disable-debug \
    --disable-gstreamer-thumbnailer
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
