# $Id: PKGBUILD 228324 2015-01-01 11:29:49Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=meld
pkgver=3.12.3
pkgrel=1
pkgdesc='Visual diff and merge tool'
url='http://meldmerge.org/'
license=(GPL)
arch=(any)
makedepends=(intltool itstool)
install=meld.install
depends=(python2-gobject python2-cairo gtksourceview3 hicolor-icon-theme desktop-file-utils
         gsettings-desktop-schemas)
optdepends=('python2-dbus: open a new tab in an already running instance')
source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-${pkgver}.tar.xz")
sha1sums=('01d742bf5a12879bc1591110f3ee90496195b76b')

# Meld does not support Python 3. The build succeeds, but
# the main executable checks the version and errors out.

build() {
  cd $pkgname-$pkgver
  python2 setup.py build
}

package() {
  cd $pkgname-$pkgver
  # using --skip-build breaks install
  python2 setup.py --no-update-icon-cache --no-compile-schemas \
    install --prefix=/usr --root="$pkgdir" --optimize=1
}
