# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# 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.20.4
pkgrel=1
pkgdesc="Compare files, directories and working copies"
url="https://meldmerge.org/"
license=(GPL)
arch=(any)
depends=(python-gobject python-cairo gtksourceview3 gsettings-desktop-schemas dconf)
makedepends=(intltool yelp-tools git)
_commit=b3810b9407263adc1cb6bbd83448794b9e9957b2  # tags/3.20.4^0
source=("git+https://gitlab.gnome.org/GNOME/meld.git#commit=$_commit")
sha1sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  cd $pkgname
  python setup.py build
}

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