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

- name: Install tesseract dependencies
  apt:
    name: ['g++', 'git', 'libjpeg62-turbo-dev', 'libpng-dev', 'libtiff-dev', 'make', 'zlib1g-dev']
    state: present

- name: Clone tesseract repository
  git:
    repo: https://github.com/nickjwhite/tesseract
    dest: /home/{{ ansible_user }}/src/tesseract
    version: amibuild
    depth: 1
  become: no
  register: tessclone

- name: Build tesseract
  make: chdir=/home/{{ ansible_user }}/src/tesseract/simplemake
  become: no
  when: tessclone.changed

- name: Install tesseract
  make: chdir=/home/{{ ansible_user }}/src/tesseract/simplemake target=install
  when: tessclone.changed
  notify: update ld.so