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