# $Id: PKGBUILD 132629 2015-05-01 20:28:40Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: William Rea <sillywilly@gmail.com>
# Contributor: Cory Farmer <rbgkofi@ameritech.net>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=gramps
pkgver=4.1.3
pkgrel=1
epoch=2
pkgdesc="A genealogy program, which helps you track your family tree"
arch=('any')
url="http://gramps-project.org/"
license=('GPL')
depends=('goocanvas' 'gtk3' 'python-gobject' 'librsvg' 'xdg-utils' 
	 'python-bsddb' 'gnome-icon-theme' 'desktop-file-utils'
	 'shared-mime-info' 'python-cairo')
makedepends=('intltool')
optdepends=('graphviz: enable creation of graphs (required for tree reports)'
	    'gtkspell3: enable spell checking in the notes'
	    'rcs: manage multiple revisions of your family trees'
	    'python-pillow: crop and convert images to JPG'
	    'libgexiv2: manage Exif metadata embedded in your media'
	    'ttf-freefont: more font support in the reports')
#	    'python-osmgpsmap: show maps in the geography view'
#	    'python-pyicu: improves localised sorting'
#	    'webkitgtk: allows websites to be opened in Gramps'
install=$pkgname.install
source=(http://downloads.sourceforge.net/project/gramps/Stable/$pkgver/gramps-$pkgver.tar.gz)
md5sums=('d9dd8e7cbd97b6275ecbec8d3cd7b21a')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  python setup.py build
}

package() {
_pyver=`pacman -Q python | cut -f2 -d' ' | cut -f1,2 -d.`
  cd "$srcdir/$pkgname-$pkgver"
  python setup.py install --root=$pkgdir
  echo -n '/usr/share' >$pkgdir/usr/lib/python${_pyver}/site-packages/gramps/gen/utils/resource-path
}
