summaryrefslogtreecommitdiff
path: root/pcr/gloobus-preview-bzr/PKGBUILD
blob: ae8a2fd8762978e65903b8952922f1cd07947965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Contributor: Alessio Sergi <asergi at archlinux dot us>
# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>

pkgname=gloobus-preview-bzr
_pkgname=gloobus-preview
pkgver=290
pkgrel=1
pkgdesc="A quicklook for GNU/Linux"
arch=('i686' 'x86_64')
url="https://launchpad.net/gloobus-preview"
license=('GPL3')
depends=('desktop-file-utils' 'djvulibre' 'gstreamer0.10-base' \
         'gtksourceview3' 'libspectre' 'poppler-glib' \
         'python2-gconf' 'taglib')
makedepends=('boost' 'bzr' 'intltool')
optdepends=('gdk-pixbuf-psd: PSD images support'
            'gdk-pixbuf-xcf: XCF images support'
            'gloobus-sushi-bzr: nautilus 3.x support'
            'libicns: ICNS files support'
            'marlin-bzr: file manager integration support'
            'nautilus-actions: nautilus menu integration'
            'nautilus-elementary-bzr: file manager integration support'
            'unoconv: LibO files support')
provides=($_pkgname)
conflicts=($_pkgname)
options=('!libtool')
install=$pkgname.install

_bzrtrunk="https://code.launchpad.net/~gloobus-dev/$_pkgname/last_working_branch"
_bzrmod="$pkgname"

build() {
  cd "$srcdir"

  msg "Connecting to Bazaar server...."

  if [[ -d "$_bzrmod" ]]; then
    cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
    msg "The local files are updated."
  else
    bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
  fi

  msg "Bazaar checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_bzrmod-build"
  cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
  cd "$srcdir/$_bzrmod-build"

  # no psd and xcf loaders
  sed -i '/loaders/d' src/Makefile.am
  sed -i '/src\/loaders/d' configure.ac

  # automake 1.12.1 fix
  sed -i 's/-Werror//' configure.ac

  # python2 fix
  sed -i 's_python_&2_' src/"$_pkgname"-configuration

  ./autogen.sh
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$_bzrmod-build"

  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et:
md5sums=()