documenting archive, adding zig helper
This commit is contained in:
@@ -1,4 +1,11 @@
|
|||||||
# vim: set filetype=yaml.ansible :
|
# vim: set filetype=yaml.ansible :
|
||||||
|
#
|
||||||
|
## Helpers: archive.yml
|
||||||
|
## Description: extract and symlink archives
|
||||||
|
## Variables: dict of key:value pairs
|
||||||
|
## extract_to: path to extract archive to
|
||||||
|
## name: filename of the archive
|
||||||
|
## url: download url of the archive
|
||||||
---
|
---
|
||||||
- name: Ensure requirements met
|
- name: Ensure requirements met
|
||||||
when:
|
when:
|
||||||
|
|||||||
27
tasks/helpers/zig.yml
Normal file
27
tasks/helpers/zig.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# vim : set filetype=yaml.ansible :
|
||||||
|
#
|
||||||
|
## Helper: zig.yml
|
||||||
|
## Description: build and install zig based packages
|
||||||
|
## Variables: dict of key:value pairs
|
||||||
|
## source_path: Destination path when cloning/extracting
|
||||||
|
## git: passed into helpers/git.yml if present. See that for required dict keys
|
||||||
|
## archive: passed into helpers/archive.yml to extract if present. See that for required dict keys
|
||||||
|
## prefix: install prefix
|
||||||
|
## flags: flags to pass to zig build
|
||||||
|
---
|
||||||
|
- name: Clone git repository if it exists
|
||||||
|
when:
|
||||||
|
- pkg.git is defined
|
||||||
|
vars:
|
||||||
|
path: "{{ pkg.source_path }}"
|
||||||
|
repo: "{{ pkg.git.repo }}"
|
||||||
|
depth: "{{ pkg.git.depth | default(omit) }}"
|
||||||
|
force: "{{ pkg.git.force | default(omit) }}"
|
||||||
|
recursive: "{{ pkg.git.recursive | default(omit) }}"
|
||||||
|
version: "{{ pkg.version | default(omit) }}"
|
||||||
|
ansible.builtin.include_tasks: helpers/git.yml
|
||||||
|
|
||||||
|
- name: Download and extract source archive
|
||||||
|
when:
|
||||||
|
- pkg.archive is defined
|
||||||
|
ansible.bulitin.include_tasks: helpers/archive.yml
|
||||||
@@ -93,6 +93,8 @@
|
|||||||
methods: "{{ ghostty[distribution].methods | default(_methods['default']) }}"
|
methods: "{{ ghostty[distribution].methods | default(_methods['default']) }}"
|
||||||
source_url: "{{ ghostty.base_url }}/{{ ghostty.version }}/ghostty-{{ ghostty.version }}.tar.gz"
|
source_url: "{{ ghostty.base_url }}/{{ ghostty.version }}/ghostty-{{ ghostty.version }}.tar.gz"
|
||||||
pkg_deps: "{{ ghostty[distribution].pkg_deps | default(omit) }}"
|
pkg_deps: "{{ ghostty[distribution].pkg_deps | default(omit) }}"
|
||||||
|
build_deps: "{{ ghostty[distribution].build_deps | default(ghostty.default.build_deps) }}"
|
||||||
|
|
||||||
- name: Configure ghostty
|
- name: Configure ghostty
|
||||||
block:
|
block:
|
||||||
- name: Set ghostty install method
|
- name: Set ghostty install method
|
||||||
@@ -105,11 +107,23 @@
|
|||||||
when:
|
when:
|
||||||
- ghostty_imethod == 'source'
|
- ghostty_imethod == 'source'
|
||||||
block:
|
block:
|
||||||
- name: Append ghostty to pkg_src
|
- name: Add ghostty package dependencies
|
||||||
|
when:
|
||||||
|
- ghostty.pkg_deps is defined
|
||||||
|
- ghostty.pkg_deps|length > 0
|
||||||
|
loop: "{{ ghostty.pkg_deps }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: dep
|
||||||
|
ansible.bulitin.include_tasks: pkgs/{{ dep }}.yml
|
||||||
|
|
||||||
|
- name: Add ghostty system dependencies
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_src: "{{ pkg_src + ghostty.pkg }}"
|
|
||||||
pkg_sys: "{{ pkg_sys + ghostty.build_deps }}"
|
pkg_sys: "{{ pkg_sys + ghostty.build_deps }}"
|
||||||
|
|
||||||
|
- name: Configure ghostty zig install
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
|
||||||
|
|
||||||
- name: Configure ghostty appimage install
|
- name: Configure ghostty appimage install
|
||||||
when:
|
when:
|
||||||
- ghostty_imethod == 'appimage'
|
- ghostty_imethod == 'appimage'
|
||||||
|
|||||||
Reference in New Issue
Block a user