157 lines
5.3 KiB
YAML
157 lines
5.3 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Configure alacritty # {{{
|
|
when:
|
|
- __alacritty_configured is undefined or
|
|
not __alacritty_configured
|
|
block:
|
|
- name: Set basic variables
|
|
ansible.builtin.set_fact:
|
|
alacritty_version: v0.16.1
|
|
alacritty_git_repo: https://github.com/alacritty/alacritty
|
|
alacritty_pkgname: alacritty
|
|
|
|
- name: Set install type
|
|
when:
|
|
- alacritty_install_method is undefined or
|
|
alacritty_install_method == ''
|
|
ansible.builtin.set_fact:
|
|
alacritty_install_method: system
|
|
|
|
- name: Install via source
|
|
when:
|
|
- alacritty_install_method is defined
|
|
- alacritty_install_method == 'source' or
|
|
install_method == 'source'
|
|
block:
|
|
- name: Configure alacritty source install
|
|
ansible.builtin.set_fact:
|
|
alacritty_install_method: source
|
|
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: "/usr/local"
|
|
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
|
|
|
|
- name: Set alacritty install options
|
|
block:
|
|
- name: Set options for RedHat based Linux
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
block:
|
|
- name: Set common build dependencies
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps:
|
|
- cmake
|
|
- fontconfig-devel
|
|
- freetype-devel
|
|
- g++
|
|
- libxcb-devel
|
|
- libxkbcommon-devel
|
|
- desktop-file-utils
|
|
|
|
- name: Add extra dependencies for EL7
|
|
when:
|
|
- ansible_distribution_major_version == 7
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps: "{{ alacritty_build_deps + ['xcb-util-devel', '@Development Tools'] }}"
|
|
|
|
- name: Add extra dependencies for EL8
|
|
when:
|
|
- ansible_distribution_major_version == 8
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps: "{{ alacritty_build_deps + ['@Development Tools'] }}"
|
|
|
|
- name: Set options for Debian based Linux
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps:
|
|
- cmake
|
|
- g++
|
|
- pkg-config
|
|
- libfontconfig1-dev
|
|
- libxcb-xfixes0-dev
|
|
- libxkbcommon-dev
|
|
- python3
|
|
- libfreetype6-dev
|
|
- desktop-file-utils
|
|
|
|
- name: Set options for Archlinux
|
|
when:
|
|
- ansible_os_family == 'Archlinux'
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps:
|
|
- cmake
|
|
- freetype2
|
|
- fontconfig
|
|
- pkg-config
|
|
- make
|
|
- libxcb
|
|
- libxkbcommon
|
|
- python
|
|
- desktop-file-utils
|
|
|
|
- name: Set options for Alpine based Linux
|
|
when: ansible_os_family == 'Alpine'
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps:
|
|
- cmake
|
|
- pkgconf
|
|
- freetype-dev
|
|
- fontconfig-dev
|
|
- python3
|
|
- libxcb-dev
|
|
- g++
|
|
- libxkbcommon-dev
|
|
- desktop-file-utils
|
|
|
|
- name: Set options for FreeBSD
|
|
when: ansible_os_family == 'FreeBSD'
|
|
ansible.builtin.set_fact:
|
|
alacritty_build_deps:
|
|
- cmake
|
|
- freetype2
|
|
- fontconfig
|
|
- pkgconf
|
|
- python3
|
|
- desktop-file-utils
|
|
|
|
- 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 + ['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] }}"
|