Files
ansible_role_package/tasks/build/ghostty.yml
Matthew Stobbs 275f5df722 change layout for better management
- instead of just `syspkgs` and `srcpkgs` add more lists
  - `appimages`, `flatpkgs` and others as they come up
2025-02-11 17:51:10 -07:00

34 lines
1.1 KiB
YAML

# vim: set filetype=yaml.ansible :
---
- 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 %}"