summaryrefslogtreecommitdiff
path: root/pcr/ocrodjvu/PKGBUILD
blob: c5c51941fdebebafca6e617e1ebe5631e9c8a49b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer (AUR): Dmitry Kharitonov <darksab0r@gmail.com>
# Contributor (AUR): Francois Garillot <francois[@]garillot.net>
# Contributor (AUR): Malkov Fyodor aka krox: iksut@yandex.ru

# parabola changes and rationale:
#  no changes.

pkgname=ocrodjvu
pkgver=0.10.2
pkgrel=1
pkgdesc="ocrodjvu is a wrapper for OCR systems, that allows you to perform OCR on DjVu files."
arch=('i686' 'x86_64' 'armv7h')
url='http://jwilk.net/software/ocrodjvu'
license=('GPL2')
depends=('python2' 'python2-lxml' 'python2-djvulibre')
optdepends=('python2-html5lib: HTML parser; required for the ``--html5`` option'
            'python2-pyicu: required for the ``--word-segmentation=uax29`` option'
            'cuneiform: OCR system' 
            'tesseract: OCR system'
            'ocrad: OCR system'
            'gocr: OCR system'
            'ocropy: OCR system')
source=(https://github.com/jwilk/ocrodjvu/releases/download/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('0dcc69ca29178cfb8f77eb85141a04f0a52b28213bd3f9b783fb3968c8850afe')

build() {
    cd "$srcdir/$pkgname-$pkgver"

    sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
        -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
        $(find ./ -name '*.py')

    python2 setup.py build
}

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