summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBruno Pagani2017-01-03 23:45:03 +0100
committerBruno Pagani2017-01-03 23:45:03 +0100
commitf448c0e957ed54c43dc5410e3d2b8396c62baa98 (patch)
treec41da09770dbe523895f4f1055949c5446219496 /PKGBUILD
parent8a52496e512ab782ca160f38ccef23ee9aee26fa (diff)
downloadaur-f448c0e957ed54c43dc5410e3d2b8396c62baa98.tar.gz
Change PKGBUILD workfow.
Update thanks to @kazuo advice: use variables to control the build options. TIFF, Previewer and Thumbnailer are now off by default. Multimedia option is added.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD68
1 files changed, 40 insertions, 28 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 345aaef0d769..4368791b934c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,58 @@
# Maintainer: Bruno Pagani (a.k.a. ArchangeGabriel) <bruno.n.pagani@gmail.com>
+# Contributor: Kazuo Teramoto <kaz.rag@gmail.com>
+
+# Configure what to build. Use "yes" or "no".
+_pdf="yes" # PDF file support
+_multimedia="no" # Multimedia PDF support
+_ps="no" # PS file support
+_djvu="no" # DjVu file support
+_dvi="no" # DVI file support
+_tiff="no" # TIFF file support
+_xps="no" # XPS file support
+_comics="no" # CB[ZR7T] comics file support
+_bookmarks="no" # Bookmarks and annotations support
+_previewer="no" # GNOME Document Previewer support
+_thumbnailer="no" # GNOME Thumbnailer support
_pkgname=evince
pkgname=${_pkgname}-light
pkgver=3.22.1
-pkgrel=1
-pkgdesc="GNOME document viewer, built with minimal dependencies"
+pkgrel=2
+pkgdesc="GNOME document viewer, built with minimal dependencies by default but configurable."
url="https://wiki.gnome.org/Apps/Evince"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('gnome-icon-theme'
- 'gtk3'
- 'libsm'
- 'libarchive'
- 'poppler-glib')
-# Add to depends:
-# 'libspectre' for PostScript
-# 'djvulibre' for DJVU
-# 'texlive-bin' for DVI
-# 'libgxps' for XPS
-# 'gvfs' for bookmark and annotations
+depends=('gnome-icon-theme' 'gtk3' 'libsm')
+
+[[ "${_pdf}" == "yes" ]] && depends+=('poppler-glib')
+[[ "${_multimedia}" == "yes" ]] && depends+=('gst-plugins-base-libs')
+[[ "${_ps}" == "yes" ]] && depends+=('libspectre')
+[[ "${_djvu}" == "yes" ]] && depends+=('djvulibre')
+[[ "${_dvi}" == "yes" ]] && depends+=('texlive-bin')
+[[ "${_xps}" == "yes" ]] && depends+=('libgxps')
+[[ "${_comics}" == "yes" ]] && depends+=('libarchive')
+[[ "${_bookmarks}" == "yes" ]] && depends+=('gvfs')
+
makedepends=('itstool' 'intltool' 'python')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
-source=("https://ftp.gnome.org/pub/GNOME/sources/${_pkgname}/${pkgver%.*}/${_pkgname}-${pkgver}.tar.xz")
+source=("https://download.gnome.org/sources/${_pkgname}/${pkgver:0:4}/${_pkgname}-${pkgver}.tar.xz")
sha256sums=('f3d439db3b5a5745d26175d615a71dffa1535235b1e3aa0b85d397ea33ab231c')
build() {
cd ${_pkgname}-${pkgver}
-# --enable-ps if building with libspectre
-# --enable-djvu if building with djvulibre
-# --enable-dvi if building with texlive-bin
-# --enable-xps if building with libgxps
-# --enable-comics if you want comics support
+ _build_cfg=''
+ [[ "${_pdf}" == "yes" ]] && _build_cfg+='--enable-pdf ' || _build_cfg+='--disable-pdf '
+ [[ "${_multimedia}" == "yes" ]] && _build_cfg+='--enable-multimedia ' || _build_cfg+='--disable-multimedia '
+ [[ "${_ps}" == "yes" ]] && _build_cfg+='--enable-ps ' || _build_cfg+='--disable-ps '
+ [[ "${_djvu}" == "yes" ]] && _build_cfg+='--enable-djvu ' || _build_cfg+='--disable-djvu '
+ [[ "${_dvi}" == "yes" ]] && _build_cfg+='--enable-dvi ' || _build_cfg+='--disable-dvi '
+ [[ "${_xps}" == "yes" ]] && _build_cfg+='--enable-xps ' || _build_cfg+='--disable-xps '
+ [[ "${_comics}" == "yes" ]] && _build_cfg+='--enable-comics ' || _build_cfg+='--disable-comics '
+ [[ "${_tiff}" == "yes" ]] && _build_cfg+='--enable-tiff ' || _build_cfg+='--disable-tiff '
+ [[ "${_previewer}" == "yes" ]] && _build_cfg+='--enable-previewer ' || _build_cfg+='--disable-previewer '
+ [[ "${_thumbnailer}" == "yes" ]] && _build_cfg+='--enable-thumbnailer ' || _build_cfg+='--disable-thumbnailer '
./configure \
--sysconfdir=/etc \
@@ -44,16 +64,8 @@ build() {
--disable-maintainer-mode \
--disable-schemas-compile \
--enable-viewer \
- --enable-previewer \
- --enable-thumbnailer \
- --enable-pdf \
- --disable-ps \
- --disable-djvu \
- --disable-dvi \
- --disable-xps \
- --disable-comics \
+ ${_build_cfg} \
--enable-t1lib \
- --enable-tiff \
--disable-nautilus \
--disable-browser-plugin \
--disable-gtk-doc \