diff options
author | Nick White <git@njw.name> | 2019-09-02 10:33:05 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-09-02 10:33:05 +0100 |
commit | 14ddee7c050d90f5cc478918d8b3290e8375483b (patch) | |
tree | 0caf0ffa33ed6f67b9a5fdf630e4c2d7444d7778 /roles/tesseractor/tasks | |
parent | dfd6a463a14d6bc67f84595cd3b51bdba90eac32 (diff) |
Split lept from tess install
Diffstat (limited to 'roles/tesseractor/tasks')
-rw-r--r-- | roles/tesseractor/tasks/leptonica.yml | 38 | ||||
-rw-r--r-- | roles/tesseractor/tasks/main.yml | 3 | ||||
-rw-r--r-- | roles/tesseractor/tasks/tesseract.yml | 25 |
3 files changed, 40 insertions, 26 deletions
diff --git a/roles/tesseractor/tasks/leptonica.yml b/roles/tesseractor/tasks/leptonica.yml new file mode 100644 index 0000000..0f8563c --- /dev/null +++ b/roles/tesseractor/tasks/leptonica.yml @@ -0,0 +1,38 @@ +--- +# Installs leptonica + +- name: Install leptonica dependencies + package: name={{ item }} state=present + with_items: + - gcc-c++ + - git + - libjpeg-turbo-devel + - libpng12-devel + - libtiff-devel + - make + - zlib-devel + +- name: Clone leptonica repository + git: + repo: https://github.com/nickjwhite/leptonica + dest: /home/ec2-user/src/leptonica + version: addinstall + depth: 1 + become: no + register: leptclone + +- name: Build leptonica + command: make -f makefile.static {{ item }} + args: + chdir: /home/ec2-user/src/leptonica/src + with_items: + - nodebug + - SHARED=yes shared + become: no + when: leptclone.changed + +- name: Install leptonica + command: make -f makefile.static install + args: + chdir: /home/ec2-user/src/leptonica/src + when: leptclone.changed diff --git a/roles/tesseractor/tasks/main.yml b/roles/tesseractor/tasks/main.yml index 33d6a30..4336c04 100644 --- a/roles/tesseractor/tasks/main.yml +++ b/roles/tesseractor/tasks/main.yml @@ -1,3 +1,4 @@ --- -- include: tesseract.yml - include: ldlocal.yml +- include: leptonica.yml +- include: tesseract.yml diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml index 43e08ab..17c7d60 100644 --- a/roles/tesseractor/tasks/tesseract.yml +++ b/roles/tesseractor/tasks/tesseract.yml @@ -12,31 +12,6 @@ - make - zlib-devel -- name: Clone leptonica repository - git: - repo: https://github.com/nickjwhite/leptonica - dest: /home/ec2-user/src/leptonica - version: addinstall - depth: 1 - become: no - register: leptclone - -- name: Build leptonica - command: make -f makefile.static {{ item }} - args: - chdir: /home/ec2-user/src/leptonica/src - with_items: - - nodebug - - SHARED=yes shared - become: no - when: leptclone.changed - -- name: Install leptonica - command: make -f makefile.static install - args: - chdir: /home/ec2-user/src/leptonica/src - when: leptclone.changed - - name: Clone tesseract repository git: repo: https://github.com/nickjwhite/tesseract |