forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 11
/
PKGBUILD
51 lines (43 loc) · 1.87 KB
/
PKGBUILD
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
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# The traineddata and related files for all languages should be placed in tessdata directory
# Creates separate traineddata packages for each language
# osd.traineddata (Orientation and script detection) is included with tesseract-ocr
_langs=(afr amh ara asm aze aze_cyrl bel ben bod bos bul cat ceb ces
chi_sim chi_tra chr cym dan dan_frak deu deu_frak dzo ell eng enm epo
equ est eus fas fin fra frk frm gle glg grc guj hat heb hin hrv hun
iku ind isl ita ita_old jav jpn kan kat kat_old kaz khm kir kor kur
lao lat lav lit mal mar mkd mlt msa mya nep nld nor ori pan pol
por pus ron rus san sin slk slk_frak slv spa spa_old sqi srp srp_latn
swa swe syr tam tel tgk tgl tha tir tur uig ukr urd uzb uzb_cyrl vie yid)
_langs_deva=(hin mar nep san)
_realname=tesseract-data
pkgbase=mingw-w64-${_realname}
pkgname=($(for l in ${_langs[@]}; do echo ${MINGW_PACKAGE_PREFIX}-${_realname}-${l}; done) )
pkgver=3.04.00
pkgrel=1
pkgdesc="Language tessdata for Tesseract OCR engine (mingw-w64)"
arch=('any')
url="https://github.com/tesseract-ocr/tessdata"
license=("Apache License 2.0")
depends=()
source=(${_realname}-$pkgver.tar.gz::https://github.com/tesseract-ocr/tessdata/archive/$pkgver.tar.gz)
sha256sums=('5dcb37198336b6953843b461ee535df1401b41008d550fc9e43d0edabca7adb1')
build() {
true
}
# Declare the package functions for tessdata
for l in ${_langs[@]}; do
eval "
package_${MINGW_PACKAGE_PREFIX}-${_realname}-${l}(){
pkgdesc=\"($l) Language tessdata for Tesseract OCR engine (mingw-w64)\"
pkgver=3.04.00
pkgrel=1
depends=()
groups=(${_realname})
mkdir -p \$pkgdir/${MINGW_PREFIX}/share/tessdata
cp \$srcdir/tessdata-$pkgver/${l}.* \$pkgdir/${MINGW_PREFIX}/share/tessdata/
find \$pkgdir/${MINGW_PREFIX}/share/tessdata -type f -exec chmod 0644 {} \;
}
"
done