# $Id: PKGBUILD 97911 2013-10-01 04:14:54Z bgyorgy $
# 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.1
pkgrel=5
epoch=2
pkgdesc="A genealogy program, which helps you track your family tree"
arch=('any')
url="http://gramps-project.org/"
license=('GPL')
depends=('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=('078ae6f9138570447081b64f8ae8a701'
         'b2443587e08c4951f00e9401d47e1ccc')

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

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

package() {
  cd "$srcdir/$pkgname-$pkgver"
  python setup.py install --root=$pkgdir
  echo -n '/usr/share' >$pkgdir/usr/lib/python3.3/site-packages/gramps/gen/utils/resource-path
}
