51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Remove existing install
|
|
when:
|
|
- hyprland_protocols.clean
|
|
become: true
|
|
loop: "{{ hyprland_protocols.installed_files }}"
|
|
loop_control:
|
|
loop_var: file
|
|
ansible.builtin.file:
|
|
state: absent
|
|
path: "{{ hyprland_protocols.prefix }}/{{ file }}"
|
|
|
|
- name: Check if hyprland-protocols is installed
|
|
register: stat_hyprland_protocols_inst
|
|
ansible.builtin.stat:
|
|
path: "{{ hyprland_protocols.prefix }}/share/hyprland-protocols/protocols/hyprland-ctm-control-v1.xml"
|
|
|
|
- name: Build and install hyprland-protocols
|
|
when:
|
|
- not stat_hyprland_protocols_inst.stat.exists
|
|
block:
|
|
- name: Clone git repository
|
|
ansible.builtin.git:
|
|
depth: 1
|
|
recursive: true
|
|
dest: "{{ hyprland_protocols.git_path }}"
|
|
repo: "{{ hyprland_protocols.repo }}"
|
|
version: "{{ hyprland_protocols.vers }}"
|
|
|
|
- name: Build hyprland-protocols
|
|
ansible.builtin.command:
|
|
creates: "{{ hyprland_protocols.git_path }}/build/build.ninja"
|
|
chdir: "{{ hyprland_protocols.git_path }}"
|
|
argv:
|
|
- meson
|
|
- setup
|
|
- --prefix={{ hyprland.prefix }}
|
|
- build
|
|
|
|
- name: Install hyprland-protocols
|
|
become: true
|
|
ansible.builtin.command:
|
|
creates: "{{ hyprland_protocols.prefix }}/share/hyprland-protocols/protocols/hyprland-ctm-control-v1.xml"
|
|
chdir: "{{ hyprland_protocols.git_path }}"
|
|
argv:
|
|
- meson
|
|
- install
|
|
- -C
|
|
- build
|