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