add the rest of the hypr tools
This commit is contained in:
66
tasks/src/hyprland_qtutils.yml
Normal file
66
tasks/src/hyprland_qtutils.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
- name: Remove existing install
|
||||
when:
|
||||
- hyprland_clean
|
||||
become: "{{ ext_become }}"
|
||||
loop: "{{ hyprland_qtutils.installed_files }}"
|
||||
loop_control:
|
||||
loop_var: file
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: "{{ hyprland.prefix }}/{{ file }}"
|
||||
|
||||
- name: Check if hyprland_qtutils is installed
|
||||
register: stat_hyprland_qtutils_bin
|
||||
ansible.builtin.stat:
|
||||
path: "{{ hyprland.prefix }}/bin/hyprland_qtutils"
|
||||
|
||||
- name: Build and install hyprland_qtutils
|
||||
when:
|
||||
- not stat_hyprland_qtutils_bin.stat.exists
|
||||
block:
|
||||
- name: Clone git repository
|
||||
ansible.builtin.git:
|
||||
depth: 1
|
||||
dest: "{{ hyprland_qtutils.git_path }}"
|
||||
recursive: true
|
||||
repo: "{{ hyprland_qtutils.repo }}"
|
||||
version: "{{ hyprland_qtutils.vers }}"
|
||||
|
||||
- name: Configure hyprland_qtutils
|
||||
ansible.builtin.command:
|
||||
creates: "{{ hyprland_qtutils.git_path }}/build"
|
||||
chdir: "{{ hyprland_qtutils.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --no-warn-unused-cli
|
||||
- -DCMAKE_BUILD_TYPE:STRING=Release
|
||||
- -DCMAKE_INSTALL_PREFIX:PATH={{ hyprland.prefix }}
|
||||
- -S
|
||||
- .
|
||||
- -B
|
||||
- ./build
|
||||
|
||||
- name: Build hyprland_qtutils
|
||||
ansible.builtin.command:
|
||||
creates: "{{ hyprland_qtutils.git_path }}/build/hyprland_qtutils"
|
||||
chdir: "{{ hyprland_qtutils.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --build
|
||||
- ./build
|
||||
- --config
|
||||
- Release
|
||||
- --target
|
||||
- all
|
||||
- -j
|
||||
- "{{ ansible_processor_nproc|int }}"
|
||||
|
||||
- name: Install hyprland_qtutils
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
creates: "{{ path.bin }}/hyprland_qtutils"
|
||||
chdir: "{{ hyprland_qtutils.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --install
|
||||
- ./build
|
||||
Reference in New Issue
Block a user