add hyprpolkit

This commit is contained in:
Matthew Stobbs
2025-03-03 16:15:11 -07:00
parent ea9e524cf9
commit 198c1f80fe
5 changed files with 106 additions and 0 deletions

View File

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