summaryrefslogtreecommitdiff
path: root/roles/tesseractor/tasks/tesseract.yml
blob: 903853c6e2651f5f4ddfd72d9794c0d51f0ae38d (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
---
# Installs tesseract

- name: Install tesseract dependencies
  package: name={{ item }} state=present
  with_items:
    - gcc-c++
    - make
    - libpng12-devel
    - libjpeg-turbo-devel
    - libtiff-devel
    - zlib-devel

- name: Install extra tesseract development dependencies
  package: name={{ item }} state=present
  with_items:
    - git

- name: Clone leptonica repository
  git:
    repo: https://github.com/nickjwhite/leptonica
    dest: /home/ec2-user/src/leptonica
    version: addinstall
    depth: 1
    force: yes

- name: Build leptonica
  command: make -f makefile.static SHARED=yes install
  args:
    chdir: /home/ec2-user/src/leptonica/src
    creates: /usr/local/lib/liblept.a

- name: Clone tesseract repository
  git:
    repo: https://github.com/nickjwhite/tesseract
    dest: /home/ec2-user/src/tesseract
    version: simplemakev4
    depth: 1

- name: Build and install tesseract
  make: chdir=/home/ec2-user/src/tesseract/simplemake target=install