summaryrefslogtreecommitdiff
path: root/roles/preprocessor/tasks/scantailor.yml
blob: 8a8820e801b71fdb17e67c93b5d027dfc782801e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
# Installs scantailor

- name: Install scantailor dependencies
  package: name={{ item }} state=present
  with_items:
    - boost-devel
    - cmake
    - gcc-c++
    - git
    - libjpeg-turbo-devel
    - libpng-devel
    - libtiff-devel
    - libXrender-devel
    - make
    - qt-devel
    - zlib-devel

- name: Clone scantailor repository
  git:
    repo: https://github.com/scantailor/scantailor
    dest: /home/ec2-user/src/scantailor
    depth: 1
  become: no
  register: scanclone

- name: Configure and build scantailor
  command: "{{ item }}"
  args:
    chdir: /home/ec2-user/src/scantailor
  with_items:
    - cmake .
    - make
  become: no
  when: scanclone.changed

- name: Install scantailor
  command: make install
  args:
    chdir: /home/ec2-user/src/scantailor
  when: scanclone.changed