aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/tesseract/tesseract-lang_4.1.0.bb
blob: dea579c4f9e1f7b6a37312ae7323a73b607cf719 (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
SUMMARY = "tesseract-ocr language files"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRCREV = "4767ea922bcc460e70b87b1d303ebdfed0897da8"
SRC_URI = "git://github.com/tesseract-ocr/tessdata.git"

S = "${WORKDIR}/git"

inherit allarch

do_install() {
    install -d ${D}${datadir}/tessdata
    cp -R --no-dereference --preserve=mode,links -v ${S}/*.traineddata ${D}${datadir}/tessdata
}

python populate_packages:prepend () {
    tessdata_dir= d.expand('${datadir}/tessdata')
    pkgs = do_split_packages(d, tessdata_dir, '^([a-z_]*)\.*', '${BPN}-%s', 'tesseract-ocr language files for %s', extra_depends='')
    pn = d.getVar('PN')
    d.appendVar('RDEPENDS:' + pn, ' '+' '.join(pkgs))
}

PACKAGES_DYNAMIC += "^${BPN}-.*"
ALLOW_EMPTY:${PN} = "1"