84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: broot
|
|
## Description: terminal utility for navigating directory trees
|
|
## Version: 1.55.0
|
|
## Methods: [source, system]
|
|
## Helpers: cargo
|
|
---
|
|
- name: Set default broot values # {{{
|
|
ansible.builtin.set_fact:
|
|
broot:
|
|
methods:
|
|
- source
|
|
- system
|
|
version: 1.55.0
|
|
build_deps:
|
|
Debian:
|
|
- build-essential
|
|
- libxcb1-dev
|
|
- libxcb-render0-dev
|
|
- libxcb-shape0-dev
|
|
- libxcb-xfixes0-dev
|
|
RedHat:
|
|
- libxcb-devel
|
|
Alpine:
|
|
- libxcb-dev
|
|
Darwin: []
|
|
# }}}
|
|
- name: Configure broot
|
|
when:
|
|
- "'broot' not in __configured"
|
|
block:
|
|
- name: Set broot install method
|
|
when:
|
|
- broot_imethod is undefined
|
|
block:
|
|
- name: Configure for RedHat <= 10
|
|
when:
|
|
- os_family == 'RedHat'
|
|
- os_version.major | int <= 10
|
|
ansible.builtin.set_fact:
|
|
broot_imethod: source
|
|
|
|
- name: Fallback set ansible_lint install method
|
|
when:
|
|
- broot_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
broot_imethod: "{{ imethod if imethod in broot.methods else broot.methods[0] }}"
|
|
|
|
- name: Configure broot source install
|
|
when:
|
|
- broot_imethod == 'source'
|
|
block:
|
|
- name: Set cargo build options
|
|
ansible.builtin.set_fact:
|
|
broot_cargo_install:
|
|
name: broot
|
|
version: "{{ broot.version }}"
|
|
|
|
- name: Append broot to install list
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + broot.build_deps[os_family] }}"
|
|
pkg_cargo: "{{ pkg_cargo + [broot_cargo_install] }}"
|
|
|
|
- name: Finalise broot source install
|
|
ansible.builtin.set_fact:
|
|
broot_install: "{{ broot_imethod }}={{ broot_cargo_install }}+{{ broot.build_deps[os_family] }}"
|
|
|
|
- name: Configure broot system install
|
|
when:
|
|
- broot_imethod == 'system'
|
|
block:
|
|
- name: Append broot to pkg_sys
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + ['broot'] }}"
|
|
|
|
- name: Finalise broot system install
|
|
ansible.builtin.set_fact:
|
|
broot_install: "{{ broot_imethod }}=broot"
|
|
|
|
- name: Set broot_configured
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'broot': broot_install } ) }}"
|