Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Oct 26th, 2010  |  syntax: None  |  size: 0.99 KB  |  hits: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=ocropy-hg
  2. pkgver=99
  3. pkgrel=1
  4. pkgdesc="Python bindings for ocropus"
  5. arch=('i686' 'x86_64')
  6. url="http://code.google.com/p/ocropus/"
  7. license=('APACHE')
  8. makedepends=('mercurial' 'python2')
  9. depends=('ocroswig-hg' 'python-scipy')
  10.  
  11. _hgroot="https://ocropy.ocropus.googlecode.com/hg/"
  12. _hgrepo="ocropy"
  13.  
  14. build() {
  15.     cd "$srcdir"
  16.     msg "Connecting to Mercurial server...."
  17.  
  18.     if [ -d $_hgrepo ] ; then
  19.         cd $_hgrepo
  20.         hg pull -u || return 1
  21.         msg "The local files are updated."
  22.     else
  23.         hg clone $_hgroot $_hgrepo || return 1
  24.     fi
  25.  
  26.     msg "Mercurial checkout done or server timeout"
  27.  
  28.     cd $srcdir/$_hgrepo
  29.  
  30.     find -name 'ocropus-*' -or -name '*.py' |
  31.         while read filename
  32.         do
  33.         {
  34.             sed 's|/usr/local/share/|/usr/share/|g; s|/usr/bin/env python$|/usr/bin/env python2|' $filename > $filename.sed
  35.             mv $filename.sed $filename;
  36.         }
  37.         done
  38.  
  39.     python2 setup.py install --root=$pkgdir
  40. }