66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
- name: Remove existing install
|
|
when:
|
|
- hyprland_clean
|
|
become: "{{ ext_become }}"
|
|
loop: "{{ hyprgraphics.installed_files }}"
|
|
loop_control:
|
|
loop_var: file
|
|
ansible.builtin.file:
|
|
state: absent
|
|
path: "{{ hyprland.prefix }}/{{ file }}"
|
|
|
|
- name: Check if hyprgraphics is installed
|
|
register: stat_hyprgraphics_inst
|
|
ansible.builtin.stat:
|
|
path: "{{ hyprland.prefix }}/{{ lib_path }}/libhyprgraphics.so"
|
|
|
|
- name: Build and install hyprgraphics
|
|
when:
|
|
- not stat_hyprgraphics_inst.stat.exists
|
|
block:
|
|
- name: Clone git repository
|
|
ansible.builtin.git:
|
|
depth: 1
|
|
dest: "{{ hyprgraphics.git_path }}"
|
|
repo: "{{ hyprgraphics.repo }}"
|
|
version: "{{ hyprgraphics.vers }}"
|
|
|
|
- name: Configure hyprgraphics
|
|
ansible.builtin.command:
|
|
creates: "{{ hyprgraphics.git_path }}/build"
|
|
chdir: "{{ hyprgraphics.git_path }}"
|
|
argv:
|
|
- cmake
|
|
- --no-warn-unused-cli
|
|
- DCMAKE_BUILD_TYPE=Release
|
|
- -DCMAKE_INSTALL_PREFIX={{ hyprland.prefix }}
|
|
- -S
|
|
- .
|
|
- -B
|
|
- ./build
|
|
|
|
- name: Build hyprgraphics
|
|
ansible.builtin.command:
|
|
creates: "{{ hyprgraphics.git_path }}/build/libhyprgraphics.so"
|
|
chdir: "{{ hyprgraphics.git_path }}"
|
|
argv:
|
|
- cmake
|
|
- --build
|
|
- ./build
|
|
- --config
|
|
- Release
|
|
- --target
|
|
- all
|
|
- -j
|
|
- "{{ ansible_processor_nproc|int }}"
|
|
|
|
- name: Install hyprgraphics
|
|
become: true
|
|
ansible.builtin.command:
|
|
creates: "{{ path.bin }}/hyprgraphics"
|
|
chdir: "{{ hyprgraphics.git_path }}"
|
|
argv:
|
|
- cmake
|
|
- --install
|
|
- ./build
|