# $Id: PKGBUILD 117057 2014-08-09 00:00:47Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Bartłomiej Piotrowski
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Tomas A. Schertel <tschertel@gmail.com>

pkgname=cherrytree
pkgver=0.34.0
pkgrel=1
pkgdesc='Hierarchical note taking application featuring rich text and syntax highlighting'
arch=('any')
url='http://www.giuspen.com/cherrytree/'
license=('GPL3')
depends=('pygtksourceview2' 'python2-dbus' 'desktop-file-utils')
optdepends=('python2-pyenchant: for spell checking support'
            'p7zip: for password protection support')
install=cherrytree.install
source=(http://www.giuspen.com/software/$pkgname-$pkgver.tar.xz)
sha256sums=('a1af44a2e1652dec2b212af939b38b95e937641f473b1e2f4cd3b06a97f81519')

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

package() {
  cd $pkgname-$pkgver
  python2 setup.py install --root="$pkgdir/" --optimize=1

  # Fix file permissions
  find "$pkgdir/usr/share" -type f | xargs chmod 644
}
