# $Id: PKGBUILD 145477 2015-11-01 18:56:53Z arodseth $
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# 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.3
pkgrel=3
pkgdesc='Versatile file searching tool'
arch=('any')
url='https://launchpad.net/catfish-search'
license=('GPL')
install="$pkgname.install"
depends=('python-gobject' 'python-xdg' 'python-pexpect' 'python-cairo' 'python-ptyprocess' 'gtk3' 'xdg-utils')
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=('1f6fc743478545b81ff580ff43413e221aec340a4e3d57bc3edc94746d8604f8')

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

  sed -i 's|ln -sf $(PREFIX)/share|ln -sf ..|' Makefile.in.in

  # Is likely to be fixed for the next release. Bug: FS#46892
  sed -i 's|listboxrow6|application_menu_update|' data/ui/CatfishWindow.ui
}

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

  ./configure --prefix=/usr
  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: bazaar.launchpad.net/~catfish-search/catfish-search/trunk/view/head:/configure
# vim:set ts=2 sw=2 et:
