add file lists to ghostty and neovim src install

This commit is contained in:
Matthew Stobbs
2025-03-18 07:22:21 -06:00
parent e799d616a0
commit 040ea8339b
6 changed files with 2633 additions and 16 deletions

View File

@@ -12,12 +12,14 @@
ghostty:
method: "{{ ghostty.method }}"
arch: "{{ pkgconfig.ghostty.archmap[ansible_architecture] }}"
clean: "{{ pkgconfig.ghostty.clean_install }}"
deps: "{{ pkgconfig.ghostty.build_deps[ansible_os_family] }}"
vers: "{{ pkgconfig.ghostty.version }}"
pkg: "{{ pkgconfig.ghostty[ghostty.method] }}"
repo: "{{ pkgconfig.ghostty.git_repo }}"
build_deps: "{{ pkgconfig.ghostty.build_deps[ansible_os_family] }}"
optimize: "{{ pkgconfig.ghostty.optimize }}"
installed_files: "{{ pkgconfig.ghostty.build_installed_files }}"
- name: Set ghostty package manager install
when:

View File

@@ -24,6 +24,8 @@
git_repo: "{{ pkgconfig.neovim.git_repo }}"
git_path: "{{ d_tempdir.path }}/neovim"
build_type: "{{ pkgconfig.neovim.build_type }}"
clean: "{{ pkgconfig.neovim.clean_install }}"
installed_files: "{{ pkgconfig.neovim.build_installed_files }}"
- name: Set neovim config for appimage install
when:

View File

@@ -1,6 +1,24 @@
# vim: set filetype=yaml.ansible :
---
- name: Clean existing install
when:
- ghostty.clean
become: "{{ ext_become }}"
loop: "{{ ghostty.installed_files }}"
loop_control:
loop_var: file
ansible.builtin.file:
state: absent
path: "{{ path.prefix }}/{{ file }}"
- name: Check if ghostty is installed
register: stat_ghostty_inst
ansible.builtin.stat:
path: "{{ path.prefix }}/bin/ghostty"
- name: Install and build source for {{ pkg }}
when:
- not stat_ghostty_inst.stat.exists
block:
- name: Clone git repository {{ pkg }}
ansible.builtin.git:
@@ -14,4 +32,5 @@
register: c_ghostty_build
ansible.builtin.command:
chdir: "{{ d_tempdir.path }}/ghostty"
creates: "{{ path.prefix }}/bin/ghostty"
cmd: "zig build -p {{ path.prefix }} -Doptimize={{ ghostty.optimize }}"

View File

@@ -1,19 +1,40 @@
# vim: set filetype=yaml.ansible :
---
- name: Clone neovim git repository
ansible.builtin.git:
depth: 1
dest: "{{ neovim.git_path }}"
repo: "{{ neovim.git_repo }}"
version: "{{ neovim.vers }}"
recursive: true
- name: Build and install neovim
- name: Clean existing install
become: "{{ ext_become }}"
community.general.make:
chdir: "{{ neovim.git_path }}"
params:
CMAKE_BUILD_TYPE: "{{ neovim.build_type }}"
CMAKE_EXTRA_FLAGS: "-DCMAKE_INSTALL_PREFIX={{ path.prefix }}"
target: install
jobs: "{{ ansible_processor_nproc | int }}"
when:
- neovim.installed_files is defined
- neovim.clean
loop: "{{ neovim.installed_files }}"
loop_control:
loop_var: file
ansible.builtin.file:
path: "{{ path.prefix }}/{{ file }}"
state: absent
- name: Check if neovim is already installed in {{ path.prefix }}
register: stat_neovim_inst
ansible.builtin.stat:
path: "{{ path.prefix }}/bin/nvim"
- name: Build and install neovim {{ neovim.git_branch }}
when:
- not stat_neovim_inst.stat.exists
block:
- name: Clone neovim git repository
ansible.builtin.git:
depth: 1
dest: "{{ neovim.git_path }}"
repo: "{{ neovim.git_repo }}"
version: "{{ neovim.vers }}"
recursive: true
- name: Build and install neovim
become: "{{ ext_become }}"
community.general.make:
chdir: "{{ neovim.git_path }}"
params:
CMAKE_BUILD_TYPE: "{{ neovim.build_type }}"
CMAKE_EXTRA_FLAGS: "-DCMAKE_INSTALL_PREFIX={{ path.prefix }}"
target: install
jobs: "{{ ansible_processor_nproc | int }}"