add archive to make helper

- helper 'make' will check for repo to use git, and extract_to to use
archive
- configure target is changed to run the ./configure script
This commit is contained in:
2026-04-18 11:16:02 -06:00
parent 2c008ecdda
commit bc7364185b
2 changed files with 78 additions and 4 deletions

View File

@@ -5,21 +5,29 @@
## Variables:
##
---
- name: Fetch source code
- name: Fetch source code git
vars:
path: "{{ pkg.path }}"
repo: "{{ pkg.repo }}"
version: "{{ pkg.version | default(omit) }}"
when:
- pkg.repo is defined
ansible.builtin.include_tasks: helpers/git.yml
- name: Fetch source code archive
vars:
archive: "{{ pkg }}"
when:
- pkg.extract_to is defined
ansible.builtin.include_tasks: helpers/archive.yml
- name: Run configure target
when:
- pkg.target.configure is defined
register: make_configure
community.general.make:
ansible.builtin.command:
chdir: "{{ pkg.path }}"
target: "{{ pkg.target.configure.name }}"
params: "{{ pkg.target.configure.params | default(omit) }}"
argv: ["./configure", "{{ pkg.target.configure.options }}"]
- name: Run build target
when: