summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Pagani2017-01-03 23:45:03 +0100
committerBruno Pagani2017-01-03 23:45:03 +0100
commitf448c0e957ed54c43dc5410e3d2b8396c62baa98 (patch)
treec41da09770dbe523895f4f1055949c5446219496
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.
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD68
2 files changed, 43 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index edcae9364d4..9d8d85a912e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = evince-light
- pkgdesc = GNOME document viewer, built with minimal dependencies
+ pkgdesc = GNOME document viewer, built with minimal dependencies by default but configurable.
pkgver = 3.22.1
- pkgrel = 1
+ pkgrel = 2
url = https://wiki.gnome.org/Apps/Evince
arch = i686
arch = x86_64
@@ -12,11 +12,10 @@ pkgbase = evince-light
depends = gnome-icon-theme
depends = gtk3
depends = libsm
- depends = libarchive
depends = poppler-glib
provides = evince
conflicts = evince
- source = https://ftp.gnome.org/pub/GNOME/sources/evince/3.22/evince-3.22.1.tar.xz
+ source = https://download.gnome.org/sources/evince/3.22/evince-3.22.1.tar.xz
sha256sums = f3d439db3b5a5745d26175d615a71dffa1535235b1e3aa0b85d397ea33ab231c
pkgname = evince-light
diff --git a/PKGBUILD b/PKGBUILD
index 345aaef0d76..4368791b934 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 \