add helpers for git cloning and building
This commit is contained in:
@@ -20,13 +20,11 @@
|
||||
when:
|
||||
- not stat_aquamarine_inst.stat.exists
|
||||
block:
|
||||
- name: Clone git repository {{ pkg }}
|
||||
ansible.builtin.git:
|
||||
depth: 1
|
||||
force: true
|
||||
dest: "{{ aquamarine.git_path }}"
|
||||
repo: "{{ aquamarine.repo }}"
|
||||
version: "{{ aquamarine.vers }}"
|
||||
- name: Do repo clone {{ pkg }}
|
||||
vars:
|
||||
repo: "{{ aquamarine }}"
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/git.yml
|
||||
|
||||
- name: Apply patch for alpine linux {{ pkg }}
|
||||
when:
|
||||
@@ -37,41 +35,8 @@
|
||||
state: present
|
||||
strip: 1
|
||||
|
||||
- name: Configure {{ pkg }}
|
||||
ansible.builtin.command:
|
||||
creates: "{{ aquamarine.git_path }}/build"
|
||||
chdir: "{{ aquamarine.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --no-warn-unused-cli
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX={{ hyprland.prefix }}
|
||||
- -S
|
||||
- .
|
||||
- -B
|
||||
- ./build
|
||||
|
||||
- name: Build {{ pkg }}
|
||||
ansible.builtin.command:
|
||||
creates: "{{ aquamarine.git_path }}/build/libaquamarine.so"
|
||||
chdir: "{{ aquamarine.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --build
|
||||
- ./build
|
||||
- --config
|
||||
- Release
|
||||
- --target
|
||||
- all
|
||||
- -j
|
||||
- "{{ ansible_processor_nproc | int }}"
|
||||
|
||||
- name: Install {{ pkg }}
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
creates: "{{ hyprland.prefix }}/{{ lib_path }}/libaquamarine.so"
|
||||
chdir: "{{ aquamarine.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --install
|
||||
- ./build
|
||||
- name: Do build and install {{ pkg }}
|
||||
vars:
|
||||
repo: "{{ aquamarine }}"
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/cmake_build.yml
|
||||
|
||||
Reference in New Issue
Block a user