# $Id: PKGBUILD 225111 2014-10-20 17:50:42Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=evince
pkgver=3.14.1
pkgrel=2
pkgdesc="Document viewer (PDF, Postscript, djvu, tiff, dvi, XPS, SyncTex support with gedit, comics books (cbr,cbz,cb7 and cbt))"
url="https://wiki.gnome.org/Apps/Evince"
arch=(i686 x86_64)
license=(GPL)
depends=(gtk3 libgxps libspectre gsfonts poppler-glib djvulibre t1lib libsecret desktop-file-utils dconf gsettings-desktop-schemas gnome-desktop)
makedepends=(itstool libnautilus-extension texlive-bin intltool gobject-introspection docbook-xsl python python2)
optdepends=('texlive-bin: DVI support'
	    'gvfs: bookmark support and session saving'
            'p7zip: cbz and cb7 compressed comic books'
            'tar: cbt compressed comic books'
            'unrar: cbr compressed comic books')
groups=(gnome)
install=evince.install
options=('!emptydirs')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
sha256sums=('13ec728d6957aa18ba21a3a66504dd52b8607596337f30f0908b62b5fcc14507')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr   --sysconfdir=/etc \
      --localstatedir=/var    --libexecdir=/usr/lib/evince \
      --disable-static        --enable-nautilus \
      --enable-pdf            --enable-tiff \
      --enable-djvu           --enable-dvi \
      --enable-t1lib          --enable-comics \
      --disable-scrollkeeper  --disable-schemas-compile \
      --enable-introspection --disable-browser-plugin
  make
}

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