diff options
author | Nick White <git@njw.name> | 2019-01-05 23:41:39 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-01-05 23:41:39 +0000 |
commit | 8596687b33b8572c62236c06ed11aff12b782153 (patch) | |
tree | 6aeb6003cc11651946f08bc449ac00f92b7e9e32 /roles | |
parent | c2afd215e34beb69bf6e0665193ecf4d87d74e99 (diff) |
Don't clone or build software with become
This is so that the sources are appropriately owned for easy
modification and rebuilding if needed later.
Diffstat (limited to 'roles')
-rw-r--r-- | roles/tesseractor/tasks/tesseract.yml | 21 | ||||
-rw-r--r-- | roles/tesstrainer/tasks/tesseract.yml | 27 |
2 files changed, 41 insertions, 7 deletions
diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml index e63cfee..afb408a 100644 --- a/roles/tesseractor/tasks/tesseract.yml +++ b/roles/tesseractor/tasks/tesseract.yml @@ -22,10 +22,21 @@ dest: /home/ec2-user/src/leptonica version: addinstall depth: 1 + become: no register: leptclone - name: Build leptonica - command: make -f makefile.static SHARED=yes install + command: make -f makefile.static {{ item }} + args: + chdir: /home/ec2-user/src/leptonica/src + with_items: + - SHARED=yes shared + - nodebug + 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 @@ -36,8 +47,14 @@ dest: /home/ec2-user/src/tesseract version: amibuild depth: 1 + become: no register: tessclone -- name: Build and install tesseract +- name: Build tesseract + make: chdir=/home/ec2-user/src/tesseract/simplemake + become: no + when: tessclone.changed + +- name: Install tesseract make: chdir=/home/ec2-user/src/tesseract/simplemake target=install when: tessclone.changed diff --git a/roles/tesstrainer/tasks/tesseract.yml b/roles/tesstrainer/tasks/tesseract.yml index 0be3380..911759a 100644 --- a/roles/tesstrainer/tasks/tesseract.yml +++ b/roles/tesstrainer/tasks/tesseract.yml @@ -29,10 +29,21 @@ dest: /home/ec2-user/src/leptonica version: addinstall depth: 1 + become: no register: leptclone - name: Build leptonica - command: make -f makefile.static SHARED=yes install + command: make -f makefile.static {{ item }} + args: + chdir: /home/ec2-user/src/leptonica/src + with_items: + - SHARED=yes shared + - nodebug + 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 @@ -43,12 +54,18 @@ dest: /home/ec2-user/src/tesseract version: amibuild depth: 1 + become: no register: tessclone -- name: Build and install tesseract - make: chdir=/home/ec2-user/src/tesseract/simplemake target=install +- name: Build tesseract and training tools + command: make all training + args: + chdir: /home/ec2-user/src/tesseract/simplemake + become: no when: tessclone.changed -- name: Build and install tesseract training tools - make: chdir=/home/ec2-user/src/tesseract/simplemake target=install-training +- name: Install tesseract and training tools + command: make install install-training + args: + chdir: /home/ec2-user/src/tesseract/simplemake when: tessclone.changed |