Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,24 +1,85 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: broot
|
||||
## Description: terminal utility for navigating directory trees
|
||||
## Version: 1.55.0
|
||||
## Methods: [source, system]
|
||||
## Helpers: cargo
|
||||
---
|
||||
- name: Add broot
|
||||
- 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: Load broot config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/broot.yml
|
||||
|
||||
- name: Append broot to pkg_sys and pkg_cargo
|
||||
- name: Set broot install method
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + broot.deps }}"
|
||||
pkg_cargo: "{{ pkg_cargo + [broot] }}"
|
||||
- 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: Append broot to pkg_sys
|
||||
- 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:
|
||||
- ansible_system == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['broot'] }}"
|
||||
- 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
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
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:
|
||||
broot_configured: true
|
||||
__configured: "{{ __configured | combine( { 'broot': broot_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user