diff options
author | Nick White <git@njw.name> | 2019-01-04 21:05:33 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-01-04 21:05:33 +0000 |
commit | 4fc9b508f80babce8bb8ac5b858109cf79d47521 (patch) | |
tree | dcb4739190b9d5c680bc01ee8f542b68d0946618 | |
parent | eb945de077b4e6bc56fc1fb4fc8d3f149f500480 (diff) |
Simplify tesseract tasks using simplified / improved make branches
-rw-r--r-- | roles/devami/tasks/tesseract.yml | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/roles/devami/tasks/tesseract.yml b/roles/devami/tasks/tesseract.yml index 7ad7da3..3cbdb4e 100644 --- a/roles/devami/tasks/tesseract.yml +++ b/roles/devami/tasks/tesseract.yml @@ -6,10 +6,6 @@ with_items: - gcc-c++ - make - - autoconf - - automake - - libtool - - pkgconfig - libpng12-devel - libjpeg-turbo-devel - libtiff-devel @@ -29,14 +25,14 @@ - name: Clone leptonica repository git: - repo: https://github.com/DanBloomberg/leptonica - dest: /home/ec2-user/leptonica - version: 1.77.0 + repo: https://github.com/nickjwhite/leptonica + dest: /home/ec2-user/src/leptonica + version: addinstall depth: 1 - name: Configure leptonica environ.h lineinfile: - dest: /home/ec2-user/leptonica/src/environ.h + dest: /home/ec2-user/src/leptonica/src/environ.h line: {{ item }} insertbefore: "^#endif * LEPTONICA_ENVIRON_H" with_items: @@ -45,34 +41,16 @@ - name: Build leptonica make: - chdir: /home/ec2-user/leptonica/src - target: "-f makefile.static shared" + chdir: /home/ec2-user/src/leptonica/src + target: "-f makefile.static install" params: SHARED=yes -# TODO: in due course replace this with our repo and branch - name: Clone tesseract repository git: - repo: https://github.com/tesseract-ocr/tesseract - dest: /home/ec2-user/tesseract - version: 4.0.0 + repo: https://github.com/nickjwhite/tesseract + dest: /home/ec2-user/src/tesseract + version: simplemakev4 depth: 1 -- name: Run autogen.sh for tesseract - command: /home/ec2-user/tesseract/autogen.sh - args: - chdir: /home/ec2-user/tesseract - creates: /home/ec2-user/tesseract/configure - -# NOTE: lept headers and libs dirs are probably incorrect -# TODO: split the shell line if possible -- name: Run configure for tesseract - shell: LIBLEPT_HEADERSDIR=$HOME/leptonica/src/ /home/ec2-user/tesseract/configure --prefix=$HOME/tessinstall/ --with-extra-libraries=$HOME/leptonica/src - args: - chdir: /home/ec2-user/tesseract - creates: /home/ec2-user/tesseract/makefile - - name: Build and install tesseract - make: chdir=/home/ec2-user/tesseract target=install - -- name: Build and install tesseract training tools - make: chdir=/home/ec2-user/tesseract target=training-install + make: chdir=/home/ec2-user/src/tesseract target=install |