blob: dea579c4f9e1f7b6a37312ae7323a73b607cf719 [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001SUMMARY = "tesseract-ocr language files"
2
3LICENSE = "Apache-2.0"
Andrew Geissler97771a32021-03-05 15:23:11 -06004LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
Patrick Williamsddad1a12017-02-23 20:36:32 -06005
Andrew Geissler97771a32021-03-05 15:23:11 -06006SRCREV = "4767ea922bcc460e70b87b1d303ebdfed0897da8"
Patrick Williamsddad1a12017-02-23 20:36:32 -06007SRC_URI = "git://github.com/tesseract-ocr/tessdata.git"
Brad Bishop779d0ac2019-09-27 08:23:48 -04008
Patrick Williamsddad1a12017-02-23 20:36:32 -06009S = "${WORKDIR}/git"
10
11inherit allarch
12
13do_install() {
14 install -d ${D}${datadir}/tessdata
Brad Bishop779d0ac2019-09-27 08:23:48 -040015 cp -R --no-dereference --preserve=mode,links -v ${S}/*.traineddata ${D}${datadir}/tessdata
Patrick Williamsddad1a12017-02-23 20:36:32 -060016}
17
Patrick Williams213cb262021-08-07 19:21:33 -050018python populate_packages:prepend () {
Patrick Williamsddad1a12017-02-23 20:36:32 -060019 tessdata_dir= d.expand('${datadir}/tessdata')
20 pkgs = do_split_packages(d, tessdata_dir, '^([a-z_]*)\.*', '${BPN}-%s', 'tesseract-ocr language files for %s', extra_depends='')
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021 pn = d.getVar('PN')
Patrick Williams213cb262021-08-07 19:21:33 -050022 d.appendVar('RDEPENDS:' + pn, ' '+' '.join(pkgs))
Patrick Williamsddad1a12017-02-23 20:36:32 -060023}
24
25PACKAGES_DYNAMIC += "^${BPN}-.*"
Patrick Williams213cb262021-08-07 19:21:33 -050026ALLOW_EMPTY:${PN} = "1"