summaryrefslogtreecommitdiff
path: root/testing/tracker/PKGBUILD
blob: 3c396174c2edd92367dee5760a4a4dadc769b5d0 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# $Id: PKGBUILD 169148 2012-10-18 19:22:25Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Alexander Fehr <pizzapunk gmail com>

pkgbase=tracker
pkgname=(tracker libtracker-sparql)
pkgver=0.14.2
_tver=${pkgver%.*}
pkgrel=2
pkgdesc="All-in-one indexer, search tool and metadata database"
arch=('i686' 'x86_64')
license=('GPL')
makedepends=('libgee' 'libgnome-keyring' 'upower' 'libexif' 'exempi'
             'poppler-glib' 'libgsf' 'icu' 'enca' 'networkmanager' 'gtk3'
             'desktop-file-utils' 'hicolor-icon-theme' 'gobject-introspection'
             'intltool' 'giflib' 'gstreamer0.10-base' 'totem-plparser'
             'taglib' 'nautilus' 'gnome-panel' 'libvorbis' 'flac' 'vala')
url="http://www.gnome.org"
options=('!libtool' '!emptydirs')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/$_tver/$pkgbase-$pkgver.tar.xz
        bug675660.patch
        tracker-extract-pdf-crash-fix.patch)
sha256sums=('9b59330aa2e9e09feee587ded895e9247f71fc25f46b023d616d9969314bc7f1'
            '77c1377860f09aba42fc0bb662cb188613d5ed3744f3ffb3a710d1e60499cb8c'
            'afa14805b9a1adb2442dc4a6032b1575a07a87aa969599ca28669a2cf975e772')

build() {
  cd $pkgbase-$pkgver

  patch -Np1 -i "${srcdir}/bug675660.patch"
  patch -Np1 -i "${srcdir}/tracker-extract-pdf-crash-fix.patch"
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --libexecdir=/usr/lib/tracker \
    --disable-unit-tests \
    --enable-libflac \
    --enable-libvorbis

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool

  make
}

package_tracker() {
  depends=("libtracker-sparql=$pkgver-$pkgrel" 'libgee' 'libgnome-keyring'
           'upower' 'libexif' 'exempi' 'poppler-glib' 'libgsf' 'enca'
           'networkmanager' 'gtk3' 'desktop-file-utils' 'hicolor-icon-theme')
  optdepends=('giflib: extractor for GIF data'
              'gstreamer0.10-base: video extractor'
              'totem-plparser: playlist support'
              'nautilus: nautilus-extension'
              'libvorbis: Vorbis metadata extractor'
              'flac: FLAC metadata extractor'
              'taglib: writeback for audio files'
              'gnome-panel: tracker-search-bar')
  groups=('gnome-extra')
  install=tracker.install

  cd $pkgbase-$pkgver
  make DESTDIR="$pkgdir" install

### Split libtracker-sparql

  mkdir -p "$srcdir"/sparql/usr/{include,lib}/tracker-$_tver
  mkdir -p "$srcdir"/sparql/usr/lib/{girepository-1.0,pkgconfig}
  mkdir -p "$srcdir"/sparql/usr/share/{gir-1.0,vala/vapi}

  mv "$pkgdir"/usr/lib/libtracker-sparql-* "$srcdir/sparql/usr/lib"

  mv "$pkgdir"/usr/lib/tracker-$_tver/*.so* \
    "$srcdir/sparql/usr/lib/tracker-$_tver"

  mv "$pkgdir"/usr/share/vala/vapi/tracker-sparql-* \
    "$srcdir/sparql/usr/share/vala/vapi"

  mv {"$pkgdir","$srcdir/sparql"}/usr/include/tracker-$_tver/libtracker-sparql
  mv {"$pkgdir","$srcdir/sparql"}/usr/lib/girepository-1.0/Tracker-$_tver.typelib
  mv {"$pkgdir","$srcdir/sparql"}/usr/lib/pkgconfig/tracker-sparql-$_tver.pc
  mv {"$pkgdir","$srcdir/sparql"}/usr/share/gir-1.0/Tracker-$_tver.gir
}

package_libtracker-sparql() {
  pkgdesc="$pkgdesc (SPARQL library)"
  depends=('sqlite' 'icu' 'glib2' 'libffi' 'pcre' 'util-linux')

  mv "$srcdir"/sparql/* "$pkgdir"
}