working on alacritty source install
- adding cargo build helper
This commit is contained in:
@@ -1,23 +1,114 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append alacritty
|
||||
- name: Configure alacritty # {{{
|
||||
block:
|
||||
- name: Load alacritty configuration
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/alacritty.yml
|
||||
- name: Set basic variables
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_version: v0.16.1
|
||||
alacritty_git_repo: https://github.com/alacritty/alacritty
|
||||
alacritty_pkgname: alacritty
|
||||
- name: Set install type
|
||||
when:
|
||||
- alacritty_method is undefined or
|
||||
alacritty_method == ''
|
||||
block:
|
||||
- name: Install via system package manager
|
||||
when:
|
||||
- default_install_method == 'package'
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_method: package
|
||||
|
||||
- name: Install via homebrew casks
|
||||
when:
|
||||
- ansible_os_family == 'Darwin' or
|
||||
default_install_method == 'homebrew'
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_method: cask
|
||||
|
||||
- name: Install via source
|
||||
when:
|
||||
- default_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_method: source
|
||||
alacritty_src_install:
|
||||
cargo_install_type: source
|
||||
cargo_build_flags:
|
||||
- --release
|
||||
name: "{{ alacritty_pkgname }}"
|
||||
repo: "{{ alacritty_git_repo }}"
|
||||
version: "{{ alacritty_build_version }}"
|
||||
bin_output: "target/release/alacritty"
|
||||
bin_name: "alacritty"
|
||||
install_prefix: "/usr/local"
|
||||
install_files:
|
||||
share/pixmaps:
|
||||
- extra/logo/alacritty-term.svg
|
||||
desktop:
|
||||
- extra/linux/Alacritty.desktop
|
||||
|
||||
- name: Set alacritty install options
|
||||
block:
|
||||
- name: Set options for RedHat based Linux
|
||||
when: ansible_os_family == 'RedHat'
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_deps:
|
||||
- cmake
|
||||
- fontconfig-devel
|
||||
- freetype-devel
|
||||
- g++
|
||||
- libxcb-devel
|
||||
- libxkbcommon-devel
|
||||
- desktop-file-utils
|
||||
- name: Set options for Debian based Linux
|
||||
when: ansible_os_family == 'Debian'
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_deps:
|
||||
- cmake
|
||||
- libfontconfig1-dev
|
||||
- libfreetype6-dev
|
||||
- libxcb-xfixes0-dev
|
||||
- libxkbcommon-dev
|
||||
- pkg-config
|
||||
- python3
|
||||
- desktop-file-utils
|
||||
- name: Set options for Alpine based Linux
|
||||
when: ansible_os_family == 'Alpine'
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_deps:
|
||||
- cmake
|
||||
- fontconfig-dev
|
||||
- freetype-dev
|
||||
- g++
|
||||
- libxcb-dev
|
||||
- libxkbcommon-dev
|
||||
- pkgconf
|
||||
- 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: Append alacritty installation
|
||||
block:
|
||||
- name: Append alacritty to pkg_cargo
|
||||
when:
|
||||
- alacritty.method == 'cargo'
|
||||
- method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + alacritty.build_deps }}"
|
||||
pkg_cargo: "{{ pkg_cargo + [alacritty.cargo] }}"
|
||||
pkg_sys: "{{ pkg_sys + alacritty_build_deps }}"
|
||||
pkg_cargo: "{{ pkg_cargo + [alacritty_src_install] }}"
|
||||
|
||||
- name: Append alacritty to pkg_cask
|
||||
when:
|
||||
- alacritty.method == 'cask'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + ['alacritty'] }}"
|
||||
pkg_cask: "{{ pkg_cask + [alacritty_pkgname] }}"
|
||||
|
||||
- name: Set alacritty_configured
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
Reference in New Issue
Block a user