summaryrefslogtreecommitdiff
path: root/extra/tracker/PKGBUILD
blob: 8331e0bdd937be5eff1bf1d2d97d06dd314c7a80 (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
# $Id: PKGBUILD 210538 2014-04-14 20:07:35Z 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=1.0.0
pkgrel=2
pkgdesc="All-in-one indexer, search tool and metadata database"
arch=(i686 x86_64)
license=(GPL)
makedepends=(libgee libsecret upower libexif exempi
             poppler-glib libgsf icu enca networkmanager gtk3
             desktop-file-utils hicolor-icon-theme gobject-introspection
             intltool giflib gst-plugins-base-libs totem-plparser
             taglib libvorbis flac vala libgxps libnautilus-extension libmediaart)
url="http://www.gnome.org"
options=('!emptydirs')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver:0:3}/$pkgbase-$pkgver.tar.xz)
sha256sums=('a1d033faf2c78f0e239f3c2c961b96623c9a7dabd938c08e3f5660bd70f54ba2')

build() {
  cd $pkgbase-$pkgver

  ./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 libsecret
           upower libexif exempi poppler-glib libgsf enca
           networkmanager gtk3 desktop-file-utils hicolor-icon-theme libmediaart)
  optdepends=('giflib: extractor for GIF data'
              'gst-plugins-base-libs: video extractor'
              'totem-plparser: playlist support'
              'libvorbis: Vorbis metadata extractor'
              'flac: FLAC metadata extractor'
              'taglib: writeback for audio files'
              "nautilus: edit files' tracker tags"
              'libgxps: XPS extractor')
  groups=('gnome')
  install=tracker.install

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

  for dir in libtracker-{sparql,common,data,sparql-backend}; do
    make DESTDIR="$pkgdir" -C src/$dir uninstall
  done

  rm -f "$pkgdir"/usr/lib/pkgconfig/tracker-sparql-*.pc
}

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

  cd $pkgbase-$pkgver/src
  for dir in libtracker-{sparql,common,data,sparql-backend}; do
    make DESTDIR="$pkgdir" -C $dir install
  done

  install -m755 -d "$pkgdir"/usr/lib/pkgconfig
  install -m644 ../data/tracker-sparql-*.pc "$pkgdir"/usr/lib/pkgconfig/
}