--- # Installs tesseract - name: Install tesseract dependencies package: name={{ item }} state=present with_items: - gcc-c++ - git - libjpeg-turbo-devel - libpng12-devel - libtiff-devel - make - zlib-devel - name: Install tesseract training dependencies package: name={{ item }} state=present with_items: - cairo-devel - libicu-devel - pango-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 dest: /home/ec2-user/src/tesseract version: amibuild depth: 1 become: no register: tessclone - name: Build tesseract and training tools command: make all training args: chdir: /home/ec2-user/src/tesseract/simplemake become: no when: tessclone.changed - name: Install tesseract and training tools command: make install install-training args: chdir: /home/ec2-user/src/tesseract/simplemake when: tessclone.changed