110 lines
3.0 KiB
YAML
110 lines
3.0 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: neovim
|
|
## Description: fork of vim focusing on modern development
|
|
## Version: v0.12.1
|
|
## Methods: [source, system, appimage, archive]
|
|
## Helpers: [make, archive, appimage]
|
|
---
|
|
- name: Set neovim default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
neovim:
|
|
methods:
|
|
- source
|
|
- system
|
|
- appimage
|
|
- archive
|
|
git_repo: https://github.com/neovim/neovim
|
|
appimage:
|
|
base_url: https://github.com/neovim/neovim/releases/download
|
|
version: v0.12.1
|
|
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"
|
|
block:
|
|
- name: Set neovim install method
|
|
when:
|
|
- neovim_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
neovim_imethod: "{{ imethod if imethod in neovim.methods else neovim.methods[0] }}"
|
|
|
|
- name: Configure neovim source install
|
|
when:
|
|
- neovim_imethod == "source"
|
|
block:
|
|
- name: Queue pkg build deps
|
|
when:
|
|
- neovim.build_pkgdeps is defined
|
|
loop: "{{ neovim.build_pkgdeps }}"
|
|
loop_control:
|
|
loop_var: dep
|
|
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
|
|
|
- name: Set helper facts
|
|
ansible.builtin.set_fact:
|
|
neovim_src_install:
|
|
path: "{{ d_cache.path }}/neovim"
|
|
repo: "{{ neovim.git_repo }}"
|
|
version: "{{ neovim.version }}"
|
|
targets:
|
|
build:
|
|
name: ""
|
|
do_become: false
|
|
params:
|
|
CMAKE_BUILD_TYPE: Release
|
|
CMAKE_EXTRA_FLAGS: "-DCMAKE_INSTALL_PREFIX={{ install_prefix }}"
|
|
install:
|
|
name: install
|
|
do_become: true
|
|
|
|
- name: Append neovim to source install list
|
|
ansible.builtin.set_fact:
|
|
pkg_make: "{{ pkg_make + [neovim_src_install] }}"
|
|
neovim_install: "{{ neovim_imethod }}={{ neovim_src_install }}"
|
|
|
|
- name: Finalized neovim configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'neovim': neovim_imethod } ) }}"
|