more hyprland fixes

This commit is contained in:
Matthew Stobbs
2025-03-02 09:44:40 -07:00
parent 1492dd0db4
commit 18fca577e7
14 changed files with 242 additions and 17 deletions

59
tasks/src/hyprland.yml Normal file
View File

@@ -0,0 +1,59 @@
- name: Remove existing install
when:
- hyprland_clean
become: "{{ ext_become }}"
loop: "{{ hyprland.installed_files }}"
loop_control:
loop_var: file
ansible.builtin.file:
state: absent
path: "{{ path.prefix }}/{{ file }}"
- name: Build and install hyprland
block:
- name: Clone git repository
ansible.builtin.git:
depth: 1
dest: "{{ hyprland.git_path }}"
recursive: true
repo: "{{ hyprland.repo }}"
version: "{{ hyprland.vers }}"
- name: Configure hyprland
ansible.builtin.command:
creates: "{{ hyprland.git_path }}/build"
chdir: "{{ hyprland.git_path }}"
argv:
- cmake
- --no-warn-unused-cli
- DCMAKE_BUILD_TYPE:STRING=Release
- -DCMAKE_INSTALL_PREFIX:PATH={{ path.prefix }}
- -S
- .
- -B
- ./build
- name: Build hyprland
ansible.builtin.command:
creates: "{{ hyprland.git_path }}/build/Hyprland"
chdir: "{{ hyprland.git_path }}"
argv:
- cmake
- --build
- ./build
- --config
- Release
- --target
- all
- -j
- "{{ ansible_processor_nproc|int }}"
- name: Install hyprland
become: "{{ ext_become }}"
ansible.builtin.command:
creates: "{{ path.bin }}/hyprland"
chdir: "{{ hyprland.git_path }}"
argv:
- cmake
- --install
- ./build