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