desktop/tesseract/PKGBUILD

40 lines
1.4 KiB
Bash
Raw Normal View History

# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
2010-11-03 03:12:25 +08:00
_langs=(afr ara aze bel ben bul cat ces chi_sim chi_tra chr dan deu ell eng enm
epo 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)
2010-11-03 03:12:25 +08:00
pkgname=tesseract
pkgver=3.05.01
pkgrel=3
pkgdesc="An OCR program"
2015-03-15 21:31:42 +08:00
arch=(x86_64)
url="https://github.com/tesseract-ocr/tesseract"
2010-11-03 03:12:25 +08:00
license=("APACHE")
depends=(libpng libtiff libjpeg-turbo zlib giflib gcc-libs leptonica)
2016-05-05 21:37:56 +08:00
makedepends=(icu cairo pango)
install=tesseract.install
optdepends=('icu' 'cairo' 'pango'
$(for l in ${_langs[@]}; do echo tesseract-data-${l}; done))
2016-05-05 21:37:56 +08:00
source=($pkgname-$pkgver.tar.gz::https://github.com/tesseract-ocr/tesseract/archive/$pkgver.tar.gz
https://github.com/tesseract-ocr/tessdata/raw/master/osd.traineddata)
sha256sums=('05898f93c5d057fada49b9a116fc86ad9310ff1726a0f499c3e5211b3af47ec1'
'e19f2ae860792fdf372cf48d8ce70ae5da3c4052962fe22e9de1f680c374bb0e')
2010-11-03 03:12:25 +08:00
build() {
cd "$srcdir"/$pkgname-${pkgver}
[ -x configure ] || ./autogen.sh
[ -f Makefile ] || ./configure --prefix=/usr
make
2016-05-05 21:37:56 +08:00
make training
}
package() {
cd "$srcdir"/$pkgname-${pkgver}
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" training-install
mkdir -p "$pkgdir"/usr/share/tessdata
install -Dm0644 "$srcdir"/osd.traineddata "$pkgdir"/usr/share/tessdata/osd.traineddata
2013-07-27 22:30:18 +08:00
}