modified make, fixed packages and vars

- the make helper now has distinct build stages
  - configure: is now defined in pkg.targets.configure
  - build: is now defined in pkg.targets.build
  - install: is now defined in pkg.targets.install
  - added pre-install: which is a list of targets that are looped over
before install
  - added post-instal: which is a list of targets that are looped over
after install

- removed major package level variables from vars/main.yml
  - moving those variables into actual package level variables as
defaults
  - if the values are defined they will be used instead of defaults
This commit is contained in:
Matthew Stobbs
2026-03-19 13:39:26 -06:00
parent ac0ac25bba
commit d1d556d425
10 changed files with 211 additions and 76 deletions

View File

@@ -1,5 +1,64 @@
# vim: set filetype=yaml.ansible :
#
## Package: neovim
## Description: fork of vim focusing on modern development
## Version: master
## Methods: [source, system, appimage, archive]
## Helpers: [make, archive, appimage]
---
- name: Set neovim default facts # {{{
ansible.builtin.set_fact:
neovim:
install_methods:
- source
- system
- appimage
- archive
git_repo: https://github.com/neovim/neovim
appimage:
base_url: https://github.com/neovim/neovim/releases/download
pkgname:
RedHat: neovim
Debian: neovim
Darwin: neovim
FreeBSD: neovim
build_files:
- to: lib64/nvim
- to: bin/nvim
- to: share/nvim
- to: share/applications/nvim.desktop
- to: share/icons/hicolor/128x128/apps/nvim.png
- to: share/man/man1/nvim.1
build_pkgdeps:
- cmake
- git
build_deps:
RedHat:
- cmake
- curl
- gcc
- gettext
- glibc-gconv-extra
- make
- ninja-build
Debian:
- build-essential
- cmake
- curl
- gettext
- ninja-build
Darwin:
- cmake
- curl
- gettext
- ninja
Alpine:
- build-base
- cmake
- coreutils
- curl
- gettext-dev
# }}}
- name: Configure neovim
when:
- "'neovim' not in __configured"
@@ -29,12 +88,14 @@
repo: "{{ neovim.git_repo }}"
version: "{{ neovim_version }}"
targets:
- name: ""
build:
name: ""
do_become: false
params:
CMAKE_BUILD_TYPE: Release
CMAKE_EXTRA_FLAGS: "-DCMAKE_INSTALL_PREFIX={{ install_prefix }}"
- name: install
install:
name: install
do_become: true
- name: Append neovim to source install list
ansible.builtin.set_fact: