1 # Maintainer: Ilya Mezhirov <mezhirov at iupr dot com>
7 pkgdesc="Python part of OCRopus: top-level scripts"
9 url="http://code.google.com/p/ocropus/"
11 makedepends=('mercurial' 'python2')
12 depends=('ocroswig-hg' 'python-scipy' 'python-matplotlib')
18 _hgroot="https://ocropy.ocropus.googlecode.com/hg/"
23 msg "Connecting to Mercurial server...."
25 if [ -d $_hgrepo ] ; then
27 hg pull -u || return 1
28 msg "The local files are updated."
30 hg clone $_hgroot $_hgrepo || return 1
33 msg "Mercurial checkout done or server timeout"
35 rm -rf "$srcdir/$pkgname-build"
36 cp -r "$srcdir/$_hgrepo" "$srcdir/$pkgname-build"
37 cd "$srcdir/$pkgname-build"
39 msg "fixing sources with sed..."
40 find -name 'ocropus-*' -or -name '*.py' |
44 sed -i 's|/usr/local/share/|/usr/share/|g; s|/usr/bin/env python$|/usr/bin/env python2|; s|/usr/bin/python$|/usr/bin/python2|' $filename
48 msg "running setup.py"
49 python2 setup.py install --root=$pkgdir