132 lines
4.2 KiB
YAML
132 lines
4.2 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Configure alacritty # {{{
|
|
when:
|
|
- __alacritty_configured is undefined or
|
|
not __alacritty_configured
|
|
block:
|
|
- name: Set install method
|
|
when:
|
|
- alacritty_install_method is undefined
|
|
ansible.builtin.set_fact:
|
|
alacritty_install_method: "{% if default_install_method in alacritty_install_methods %}{{ default_install_method }}{% else %}{{ alacritty_install_methods[0] }}{% endif %}"
|
|
|
|
- name: Set basic variables
|
|
ansible.builtin.set_fact:
|
|
alacritty_version: "{{ alacritty_version | default('v0.16.1') }}"
|
|
alacritty_git_repo: "{{ alacritty_git_repo | default('https://github.com/alacritty/alacritty') }}"
|
|
alacritty_pkgname: "{{ alacritty_pkgname | default('alacritty') }}"
|
|
alacritty_build_deps_extra: []
|
|
|
|
- name: Configure alacritty source install
|
|
when:
|
|
- alacritty_install_method == "source"
|
|
ansible.builtin.set_fact:
|
|
alacritty_src_install:
|
|
cargo_build_flags:
|
|
- --release
|
|
name: "{{ alacritty_pkgname }}"
|
|
repo: "{{ alacritty_git_repo }}"
|
|
version: "{{ alacritty_version }}"
|
|
bin_output: "target/release/alacritty"
|
|
bin_name: "alacritty"
|
|
install_prefix: "{{ install_prefix }}"
|
|
install_files:
|
|
extra/logo/alacritty-term.svg: share/pixmaps/Alacritty.svg
|
|
desktop_files:
|
|
- extra/linux/Alacritty.desktop
|
|
files_list:
|
|
- bin/alacritty
|
|
- share/pixmaps/Alacritty.svg
|
|
alacritty_build_deps:
|
|
RedHat:
|
|
- cmake
|
|
- fontconfig-devel
|
|
- freetype-devel
|
|
- g++
|
|
- libxcb-devel
|
|
- libxkbcommon-devel
|
|
- desktop-file-utils
|
|
Debian:
|
|
- cmake
|
|
- g++
|
|
- pkg-config
|
|
- libfontconfig1-dev
|
|
- libxcb-xfixes0-dev
|
|
- libxkbcommon-dev
|
|
- python3
|
|
- libfreetype6-dev
|
|
- desktop-file-utils
|
|
Alpine:
|
|
- cmake
|
|
- pkgconf
|
|
- freetype-dev
|
|
- fontconfig-dev
|
|
- python3
|
|
- libxcb-dev
|
|
- g++
|
|
- libxkbcommon-dev
|
|
- desktop-file-utils
|
|
Archlinux:
|
|
- cmake
|
|
- freetype2
|
|
- fontconfig
|
|
- pkg-config
|
|
- make
|
|
- libxcb
|
|
- libxkbcommon
|
|
- python
|
|
- desktop-file-utils
|
|
FreeBSD:
|
|
- cmake
|
|
- freetype2
|
|
- fontconfig
|
|
- pkgconf
|
|
- python3
|
|
- desktop-file-utils
|
|
|
|
- name: Set alacritty install extra build deps
|
|
when:
|
|
- alacritty_install_method == "source"
|
|
- ansible_os_family == "RedHat"
|
|
- ansible_os_major_version < 9
|
|
block:
|
|
- name: Add extra dependencies for EL7
|
|
when:
|
|
- ansible_distribution_major_version == 7
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps_extra: ['xcb-util-devel', '@Development Tools']
|
|
|
|
- name: Add extra dependencies for EL8
|
|
when:
|
|
- ansible_distribution_major_version == 8
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps_extra: ['@Development Tools']
|
|
|
|
- name: Complete alacritty configuration
|
|
when: __alacritty_configured is undefined
|
|
ansible.builtin.set_fact:
|
|
__alacritty_configured: true
|
|
|
|
# }}}
|
|
- name: Append alacritty installation
|
|
block:
|
|
- name: Append alacritty to pkg_cargo
|
|
when:
|
|
- alacritty_method == 'source'
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + alacritty_build_deps + alacritty_build_deps_extra + ['git'] }}"
|
|
pkg_cargo_build: "{{ pkg_cargo_build + [alacritty_src_install] }}"
|
|
|
|
- name: Append alacritty to pkg_cask
|
|
when:
|
|
- alacritty_method == 'cask'
|
|
ansible.builtin.set_fact:
|
|
pkg_cask: "{{ pkg_cask + [alacritty_pkgname] }}"
|
|
|
|
- name: Append alacritty to sys_pkg
|
|
when:
|
|
- alacritty_method == 'package'
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + [alacritty_pkgname] }}"
|