add hyprpolkit
This commit is contained in:
8
tasks/config/hyprpolkitagent.yml
Normal file
8
tasks/config/hyprpolkitagent.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
- name: Set hyprpolkitagent config
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
hyprpolkitagent:
|
||||||
|
vers: "{{ pkgconfig.hyprpolkitagent.version }}"
|
||||||
|
repo: "{{ pkgconfig.hyprpolkitagent.repo }}"
|
||||||
|
build_deps: "{{ pkgconfig.hyprpolkitagent.build_deps }}"
|
||||||
|
installed_files: "{{ pkgconfig.hyprpolkitagent.build_installed_files }}"
|
||||||
|
git_path: "{{ d_tempdir.path }}/hyprpolkitagent"
|
||||||
20
tasks/pkgs/hyprpolkitagent.yml
Normal file
20
tasks/pkgs/hyprpolkitagent.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# vim: set filetype=yaml.ansible :
|
||||||
|
---
|
||||||
|
- name: Add hyprpolkitagent
|
||||||
|
when:
|
||||||
|
- hyprpolkitagent_configured is undefined
|
||||||
|
block:
|
||||||
|
- name: Set hyprpolkitagent_configured
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
hyprpolkitagent_configured: true
|
||||||
|
|
||||||
|
- name: Load hyprpolkitagent config
|
||||||
|
when:
|
||||||
|
- hyprpolkitagent is undefined
|
||||||
|
ansible.builtin.include_tasks:
|
||||||
|
file: config/hyprpolkitagent.yml
|
||||||
|
|
||||||
|
- name: Append to pkg_src
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
pkg_sys: "{{ pkg_sys + hyprpolkitagent.build_deps }}"
|
||||||
|
pkg_src: "{{ pkg_src + ['hyprpolkitagent'] }}"
|
||||||
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
|
||||||
@@ -10,6 +10,7 @@ hyprland:
|
|||||||
- hyprcursor
|
- hyprcursor
|
||||||
- hyprgraphics
|
- hyprgraphics
|
||||||
- aquamarine
|
- aquamarine
|
||||||
|
- hyprpolkitagent
|
||||||
- xdg_desktop_portal_hyprland
|
- xdg_desktop_portal_hyprland
|
||||||
build_deps:
|
build_deps:
|
||||||
RedHat:
|
RedHat:
|
||||||
|
|||||||
11
vars/pkgs/hyprpolkitagent.yml
Normal file
11
vars/pkgs/hyprpolkitagent.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
hyprpolkitagent:
|
||||||
|
version: v0.1.2
|
||||||
|
repo: "{{ hyprgitbase }}/hyprpolkitagent"
|
||||||
|
build_deps:
|
||||||
|
RedHat:
|
||||||
|
- polkit-devel
|
||||||
|
- polkit-qt6-1-devel
|
||||||
|
build_installed_files:
|
||||||
|
- libexec/hyprpolkitagent
|
||||||
|
- lib/systemd/user/hyprpolkitagent.service
|
||||||
|
- share/dbus-1/services/hyprpolkitagent.service
|
||||||
Reference in New Issue
Block a user