# $Id: PKGBUILD 108404 2014-03-27 14:47:14Z fyan $
# 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.0.3
pkgrel=2
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')
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
	block-changed.patch)
md5sums=('637d4cecbdca4a72832e1696f2412276'
         'b2443587e08c4951f00e9401d47e1ccc')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
#  patch -p0 <$srcdir/block-changed.patch
}

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
}
