# Maintainer: Brad Fanella # Contributor: Allan McRae # Contributor: Tomas A. Schertel pkgname=cherrytree pkgver=0.20.1 pkgrel=1 pkgdesc="A hierarchical note taking application featuring rich text and syntax highlighting" arch=('any') url="http://www.giuspen.com/cherrytree/" license=('GPL2') depends=('pygtksourceview2' 'hicolor-icon-theme') install=$pkgname.install source=(http://www.giuspen.com/software/${pkgname}-${pkgver}.tar.gz) md5sums=('aed517a99608014dd27559e6a0c60422') build() { cd $srcdir/${pkgname}-${pkgver} # python2 fix for file in $(find . -name '*.py'); do echo "Applying python2 fix for ${file}" sed -i 's_/usr/bin/env python_/usr/bin/env python2_' ${file} done # actual cherrytree script echo "Applying python2 fix for cherrytree" sed -i 's_/usr/bin/env python_/usr/bin/env python2_' 'cherrytree' } package() { cd $srcdir/${pkgname}-${pkgver} install -Dm755 cherrytree "${pkgdir}"/usr/bin/cherrytree install -Dm644 linux/cherrytree.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/cherrytree.svg install -Dm644 linux/cherrytree.desktop "${pkgdir}"/usr/share/applications/cherrytree.desktop mkdir -p "${pkgdir}"/usr/share/cherrytree/modules mkdir -p "${pkgdir}"/usr/share/cherrytree/glade/svg install -Dm755 modules/* "${pkgdir}"/usr/share/cherrytree/modules/ install -Dm644 glade/svg/* "${pkgdir}"/usr/share/cherrytree/glade/svg/ install -Dm644 glade/*.* "${pkgdir}"/usr/share/cherrytree/glade/ install -Dm644 locale/ru/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/ru/LC_MESSAGES/cherrytree.mo install -Dm644 locale/de/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/de/LC_MESSAGES/cherrytree.mo install -Dm644 locale/it/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/it/LC_MESSAGES/cherrytree.mo install -Dm644 locale/es/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/es/LC_MESSAGES/cherrytree.mo install -Dm644 locale/pl/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/pl/LC_MESSAGES/cherrytree.mo install -Dm644 locale/uk/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/uk/LC_MESSAGES/cherrytree.mo install -Dm644 locale/fr/LC_MESSAGES/cherrytree.mo "${pkgdir}"/usr/share/locale/fr/LC_MESSAGES/cherrytree.mo install -Dm644 linux/cherrytree.xml "${pkgdir}"/usr/share/mime/packages/cherrytree.xml install -Dm644 linux/cherrytree.mime "${pkgdir}"/usr/share/mime-info/cherrytree.mime install -Dm644 linux/cherrytree.keys "${pkgdir}"/usr/share/mime-info/cherrytree.keys install -Dm644 linux/cherrytree.applications "${pkgdir}"/usr/share/application-registry/cherrytree.applications }