-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
55 lines (49 loc) · 1.86 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
52
53
54
55
#!/bin/bash
# Forked from https://aur.archlinux.org/packages/tesseract-git/
# shellcheck disable=SC2034,SC2154
set -e
pkgname=tesseract-bundle-git
pkgver=20171108.ad5ee184
pkgrel=1
pkgdesc="An OCR Engine that was developed at HP Labs between 1985 and 1995"
arch=('i686' 'x86_64')
url="https://github.com/tesseract-ocr/tesseract"
license=('Apache')
depends=('gcc-libs' 'libtiff' 'libpng' 'leptonica' 'giflib')
optdepends=('pango: text2image' 'icu: text2image')
makedepends=('git' 'autoconf-archive' 'pango' 'icu')
provides=('tesseract' 'tesseract-data-osd' 'tesseract-data-eng' 'tesseract-data-bul')
conflicts=('tesseract' 'tesseract-data-osd' 'tesseract-data-eng' 'tesseract-data-bul')
options=('!libtool')
source=(
'tesseract::git+https://github.com/tesseract-ocr/tesseract.git'
'https://raw.githubusercontent.com/tesseract-ocr/tessdata/master/osd.traineddata'
'https://raw.githubusercontent.com/tesseract-ocr/tessdata/master/eng.traineddata'
'https://raw.githubusercontent.com/tesseract-ocr/tessdata/master/bul.traineddata'
)
sha256sums=(
'SKIP'
'9cf5d576fcc47564f11265841e5ca839001e7e6f38ff7f7aacf46d15a96b00ff'
'1cb1468826191cc7d4158fe0a3014d3f5e3bbac618d754586afc86ddae8bcdae'
'aea17ad60107f4dad3533c5e4688d2b5f67ef4d0f22b0d2975f112f493e47a24'
)
pkgver() {
cd "$srcdir/tesseract"
echo "$(date '+%Y%m%d').$(git rev-parse --short master)"
}
build() {
cd "$srcdir/tesseract"
./autogen.sh
./configure --prefix=/usr
make
make training
}
package() {
cd "$srcdir/tesseract"
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" training-install
mkdir -p "$pkgdir/usr/share/tessdata"
install -m644 "${srcdir}/osd.traineddata" "${pkgdir}/usr/share/tessdata/osd.traineddata"
install -m644 "${srcdir}/eng.traineddata" "${pkgdir}/usr/share/tessdata/eng.traineddata"
install -m644 "${srcdir}/bul.traineddata" "${pkgdir}/usr/share/tessdata/bul.traineddata"
}