aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tesseract-data/APKBUILD
blob: a55a79cb375515efa28b14ecfa6ce4536587357c (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=tesseract-data
pkgver=3.02
pkgrel=0
pkgdesc="Tesseract language data"
url="http://code.google.com/p/tesseract-ocr"
arch="noarch"
license="Apache"
depends="tesseract-ocr"
depends_dev=""
makedepends="$depends_dev"
install=""

# available langauges
#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
_langs="eng nld" 

for lang in $_langs; do
	source="$source http://tesseract-ocr.googlecode.com/files/tesseract-ocr-$pkgver.$lang.tar.gz"
	subpackages="$subpackages $pkgname-$lang"
	depends="$depends $pkgname-$lang"
done

build() {
	return 0
}

package() {
	mkdir -p "$pkgdir"
}

_mv_lang() {
	local lang=$1
	pkgdesc="$lang tesseract-ocr language files"	
	arch="noarch"
	depends="tesseract-ocr"
	mkdir -p "$subpkgdir"/usr/share/tessdata
	mv "$srcdir"/tesseract-ocr/tessdata/$lang.* \
		"$subpkgdir"/usr/share/tessdata/ || return 1
}

eng() { _mv_lang eng; }
nld() { _mv_lang nld; }

md5sums="3562250fe6f4e76229a329166b8ae853  tesseract-ocr-3.02.eng.tar.gz
6db5753b3b03296544bbb2c0f59a7178  tesseract-ocr-3.02.nld.tar.gz"
sha256sums="c110029560e7f6d41cb852ca23b66899daa4456d9afeeae9d062204bd271bdf8  tesseract-ocr-3.02.eng.tar.gz
5e2e53499a05282968e5a9699aad66ae52a5abf06ae828e2f4cf2c1f6e674a98  tesseract-ocr-3.02.nld.tar.gz"
sha512sums="4db016a3809be03855c41363788907f404e08aa277cf891e86de5f0d7da5f4f9fd76f6e19a2a983a7906a94c8235e66608fefe45e0bdc786e44e613896d1f48c  tesseract-ocr-3.02.eng.tar.gz
ee00ddb20a8ecb18ff6dbe5211bccb7bd7cf7342df8b7da29f3bde3677c8a2a24cbd99400f25224e2a2432955c11026277af8f98852016c95d349259eb746f1c  tesseract-ocr-3.02.nld.tar.gz"