aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tesseract-git/APKBUILD
blob: 39d436adcbd4a9d98279fa131a4721b68e3fccbc (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=tesseract-git
_sha=695f862bd711a147b1f27c7ea51b7592a934c77b
pkgver=20200221
pkgrel=1
pkgdesc="Tesseract Open Source OCR Engine"
url="https://github.com/tesseract-ocr/tesseract"
arch="all"
license="Apache-2.0"
makedepends="autoconf autoconf-archive automake cairo-dev icu-dev leptonica-dev libtool pango-dev tiff-dev"
replaces="tesseract-ocr"
subpackages="$pkgname-dev $pkgname-training"
source="tesseract-$pkgver.tar.gz::https://github.com/tesseract-ocr/tesseract/archive/$_sha.tar.gz
	include-time-h.patch
	"

builddir="$srcdir/tesseract-$_sha"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
        ./configure \
                --build=$CBUILD \
                --host=$CHOST \
                --prefix=/usr \
                --sysconfdir=/etc \
                --mandir=/usr/share/man \
                --infodir=/usr/share/info \
                --localstatedir=/var \
                --disable-static
        make
        make training
}

package() {
	make DESTDIR="$pkgdir" install
}

training() {
	cd "$builddir"
	make DESTDIR="$subpkgdir" training-install
}

sha512sums="a8d2396d56acf58d60ed3b3d1aeb77b52870bb1b83502070af79a5138f39a0aec27841a4fca4bdff114eb46d80630be67b2dfc8fc194f6b87c129d2357aea3c7  tesseract-20200221.tar.gz
b0fe8ed2f3d00f61749fffc7316392dbc063cd03084cba26ac84b7a3a374bebc75ad07ccb588d3f5ac83acc80d33bb9c2de05703ce50df86f48294f4a5be0424  include-time-h.patch"