This repository has been archived by the owner on Oct 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.yml
68 lines (57 loc) · 1.79 KB
/
install.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
- name: Install Grok dependencies (apt)
apt:
name: ["cmake", "libpng-dev", "libtiff-dev", "liblcms2-dev", "libwebp-dev", "libzstd-dev"]
update_cache: yes
cache_valid_time: 600
when: ansible_os_family == "Debian"
- name: Install Grok dependencies (yum)
yum:
name: ["cmake3", "libpng-devel", "libtiff-devel", "lcms2-devel"]
when: ansible_os_family == "RedHat"
- name: Clone Grok
git:
repo: https://github.com/GrokImageCompression/grok.git
dest: "{{ grok_clone_directory }}"
version: "{{ grok_version_tag }}"
- name: Make build directory
file:
path: "{{ grok_clone_directory }}/build"
state: directory
mode: "0755"
- name: Cmake grok (Debian)
command: cmake ../
args:
chdir: "{{ grok_clone_directory }}/build"
creates: "{{ grok_clone_directory }}/build/*.cmake"
when: ansible_os_family == "Debian"
- name: Cmake grok (RH/CentOS)
command: "cmake3 {{ grok_clone_directory }} -DBUILD_THIRDPARTY=ON"
args:
chdir: "{{ grok_clone_directory }}/build"
creates: "{{ grok_clone_directory }}/build/*.cmake"
when: ansible_os_family == "RedHat"
- name: Make grok
command: make
args:
chdir: "{{ grok_clone_directory }}/build"
creates: "{{ grok_clone_directory }}/build/bin/opj_decompress"
- name: Install grok
command: make install
args:
chdir: "{{ grok_clone_directory }}/build"
creates: /usr/local/bin/opj_decompress
register: grok_make_install
- name: Check if grk_decompress exists
stat:
path: /usr/local/bin/grk_decompress
register: grk_decompress
- name: Symlink grk_decompress to opj_decompress
file:
src: /usr/local/bin/grk_decompress
dest: /usr/local/bin/opj_decompress
state: link
when: grk_decompress.stat.exists
- name: Update ldconfig
command: ldconfig
when: grok_make_install.changed