1 # Contributor: Ilya Mezhirov <mezhirov at iupr dot com>
2 # This is basically the same PKGBUILD as for ocroswig-hg.
6 pkgdesc="Python bindings for iulib and C++ part of OCRopus"
8 url="http://code.google.com/p/ocropus/"
10 makedepends=('mercurial' 'swig')
11 depends=("ocropus=$pkgver" 'python-numpy')
12 source=('Makefile.patch' 'setup.py.patch')
13 md5sums=('992cb17a5e1b7e905e399b83128b727d'
14 '064698dc82e2082f30851273fa8c6ccd')
18 msg "Connecting to Mercurial server...."
20 if [ -d $pkgname ] ; then
22 hg pull -u -r ocropus-$pkgver || return 1
23 msg "The local files are updated."
25 hg clone "https://ocroswig.ocropus.googlecode.com/hg/" \
26 $pkgname -r ocropus-$pkgver || return 1
29 msg "Mercurial checkout done or server timeout"
31 rm -rf "$srcdir/$pkgname-build"
32 cp -r "$srcdir/$pkgname" "$srcdir/$pkgname-build"
33 cd "$srcdir/$pkgname-build"
35 patch -Np1 -i "$srcdir/Makefile.patch" || return 1
36 patch -Np1 -i "$srcdir/setup.py.patch" || return 1
38 PREFIX="$pkgdir/usr" make