add zig installation via tarball

This commit is contained in:
Matthew Stobbs
2025-01-25 21:16:59 -07:00
parent 66eaed6e4b
commit 343765c8a6
16 changed files with 136 additions and 86 deletions

View File

@@ -1,2 +1,32 @@
---
- name: build ghostty from source
block:
- name: create temp path
ansible.builtin.tempfile:
state: directory
prefix: ghostty.
register: d_ghostty_tmp
- name: clone ghostty git repository
ansible.builtin.git:
depth: 1
dest: "{{ d_ghostty_tmp.path }}/ghostty"
repo: "{{ pkgconfig_ghostty.git_repo }}"
version: "{{ pkgconfig_ghostty.version }}"
- name: build ghostty
ansible.builtin.command:
chdir: "{{ d_ghostty_tmp.path }}/ghostty"
cmd: "zig build -D{{ pkgconfig_ghostty.optimize }}"
register: c_ghostty_build
- name: install ghostty
ansible.file.copy:
src: "{{ d_ghostty_tmp.path }}/ghostty/zig-out/bin/ghostty"
dest: "{{ pkgconfig_ghostty.install_prefix }}/bin/ghostty"
owner: "{{ pkgconfig_ghostty.owner }}"
group: "{{ pkgconfig_ghostty.group }}"
mode: "0755"
remote_src: true
become: "{{ pkgconfig_ghostty.become }}"
become_user: "{% if pkgconfig_ghostty.become %}{{ pkgconfig_ghostty.owner }}{% else %}~{% endif %}"