# $Id: PKGBUILD 138839 2015-08-27 22:03:38Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Alexander Fehr <pizzapunk@gmail.com>
# Contributor: Pantelis Panayiotou <p.panayiotou@gmail.com>

pkgname=catfish
pkgver=1.3.0
pkgrel=1
pkgdesc='Versatile file searching tool'
arch=('any')
url='https://launchpad.net/catfish-search'
license=('GPL')
install="$pkgname.install"
depends=('gtk3' 'python2-gobject' 'python2-xdg' 'xdg-utils' 'python2-pexpect')
makedepends=('intltool')
optdepends=('zeitgeist: integration with zeitgeist'
            'findutils: filename search'
            'mlocate: filename search'
            'tracker: fulltext search'
            'strigi: fulltext search'
            'pinot: fulltext search')
source=("https://launchpad.net/catfish-search/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.bz2")
sha256sums=('b8434ba8a4ee7234cbd7cefe8d0bf0e51b2f70c7a38fdb01860de36d430c8155')

prepare() {
  cd "$pkgname-$pkgver"

  sed -i '1s|python|python2|' {bin,catfish,catfish_lib}/*.py build.py
  sed -i 's|ln -sf $(PREFIX)/share|ln -sf ..|' Makefile.in.in
}

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --python=python2
  make
}

package () {
  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
  install -d "$pkgdir"/usr/share/pixmaps
  ln -s "/usr/share/icons/hicolor/scalable/apps/$pkgname.svg" \
    "$pkgdir/usr/share/pixmaps/$pkgname.svg"
}

# getver: -u 5 launchpad.net/catfish-search
# vim:set ts=2 sw=2 et:
