add hyprpolkit
This commit is contained in:
66
tasks/src/hyprpolkitagent.yml
Normal file
66
tasks/src/hyprpolkitagent.yml
Normal 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
|
||||
Reference in New Issue
Block a user