diff options
author | Nick White <git@njw.name> | 2020-05-04 15:54:37 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-05-04 15:54:37 +0100 |
commit | ee372af8c07fa5f4c78ce0add4d779a8efb61625 (patch) | |
tree | 9a7af142dcc4e6158f63288c50d6776822e8a368 /roles/tesseractor/tasks | |
parent | 582045da94dec61bd5569230fe07ea9302f3c68b (diff) |
Roll training into main tesseract role; no need to keep it separate
Diffstat (limited to 'roles/tesseractor/tasks')
-rw-r--r-- | roles/tesseractor/tasks/leptonica.yml | 9 | ||||
-rw-r--r-- | roles/tesseractor/tasks/tesseract.yml | 29 |
2 files changed, 32 insertions, 6 deletions
diff --git a/roles/tesseractor/tasks/leptonica.yml b/roles/tesseractor/tasks/leptonica.yml index 0664529..9b07c9b 100644 --- a/roles/tesseractor/tasks/leptonica.yml +++ b/roles/tesseractor/tasks/leptonica.yml @@ -3,8 +3,15 @@ - name: Install leptonica dependencies apt: - name: ['g++', 'git', 'libjpeg62-turbo-dev', 'libpng-dev', 'libtiff-dev', 'make', 'zlib1g-dev'] state: present + name: + - g++ + - git + - libjpeg62-turbo-dev + - libpng-dev + - libtiff-dev + - make + - zlib1g-dev - name: Clone leptonica repository git: diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml index 99d15f8..56d8750 100644 --- a/roles/tesseractor/tasks/tesseract.yml +++ b/roles/tesseractor/tasks/tesseract.yml @@ -3,8 +3,23 @@ - name: Install tesseract dependencies apt: - name: ['g++', 'git', 'libjpeg62-turbo-dev', 'libpng-dev', 'libtiff-dev', 'make', 'zlib1g-dev'] state: present + name: + - g++ + - git + - libjpeg62-turbo-dev + - libpng-dev + - libtiff-dev + - make + - zlib1g-dev + +- name: Install tesseract training dependencies + apt: + state: present + name: + - libcairo2-dev + - libicu-dev + - libpango1.0-dev - name: Clone tesseract repository git: @@ -15,12 +30,16 @@ become: no register: tessclone -- name: Build tesseract - make: chdir=/home/{{ ansible_user }}/src/tesseract/simplemake +- name: Build tesseract and training tools + command: make all training + args: + 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 +- name: Install tesseract and training tools + command: make install install-training + args: + chdir=/home/{{ ansible_user }}/src/tesseract/simplemake when: tessclone.changed notify: update ld.so |