Last active
June 2, 2021 02:47
-
-
Save nofxx/d87f70448a92e7a1be10 to your computer and use it in GitHub Desktop.
Tesseract with training tools on archlinux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tesseract with training tools | |
# | |
# You must install one of tesseract-data-* packages or whole tesseract-data | |
# | |
# Based on ABS tree: | |
# Maintainer: Sergej Pupykin <[email protected]> | |
# Contributor: Andreas Hauser <[email protected]> | |
_langs=(afr ara aze bel ben bul cat ces chi_sim chi_tra chr dan deu ell | |
eng enm epo epo_alt equ est eus fin fra frk frm glg grc heb hin hrv hun | |
ind isl ita ita_old jpn kan kor lav lit mal mkd mlt msa nld nor pol por | |
ron rus slk slv spa spa_old sqi srp swa swe tam tel tgl tha tur ukr vie) | |
pkgname=tesseract-full | |
_pkgname=tesseract | |
pkgver=3.03rc1 | |
_pkgver=3.03 | |
pkgrel=1 | |
pkgdesc="An OCR program. With training tools." | |
arch=(i686 x86_64) | |
url="http://code.google.com/p/tesseract-ocr" | |
license=("APACHE") | |
depends=(libpng libtiff libjpeg zlib giflib gcc-libs leptonica icu pango cairo) | |
provides=('tesseract') | |
conflicts=('tesseract') | |
optdepends=($(for l in ${_langs[@]}; do echo tesseract-data-${l}; done)) | |
source=("http://arch.p5n.pp.ru/~sergej/dl/2014/$_pkgname-$pkgver.tar.gz") | |
md5sums=('d69ceca9ae70e0b7020d0f92d60b8565') | |
build() { | |
cd $srcdir/$_pkgname-${_pkgver} | |
[ -f Makefile ] || ./configure --prefix=/usr | |
make | |
cd training/ # hack to clean training on rc0 | |
make clean # " | |
cd .. # " | |
make training | |
} | |
package() { | |
cd $srcdir/$_pkgname-${_pkgver} | |
make DESTDIR=$pkgdir install | |
make DESTDIR=$pkgdir training-install | |
mkdir -p $pkgdir/usr/share/tessdata | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment