starting to standardize the way packages are handled
This commit is contained in:
@@ -7,38 +7,32 @@
|
||||
block:
|
||||
- name: Set basic variables
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_version: v0.16.1
|
||||
alacritty_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 == ''
|
||||
- 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: Install via system package manager
|
||||
when:
|
||||
- default_install_method == 'package'
|
||||
- name: Configure alacritty source install
|
||||
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_install_method: source
|
||||
alacritty_src_install:
|
||||
cargo_build_flags:
|
||||
- --release
|
||||
name: "{{ alacritty_pkgname }}"
|
||||
repo: "{{ alacritty_git_repo }}"
|
||||
version: "{{ alacritty_build_version }}"
|
||||
version: "{{ alacritty_version }}"
|
||||
bin_output: "target/release/alacritty"
|
||||
bin_name: "alacritty"
|
||||
install_prefix: "/usr/local"
|
||||
@@ -50,54 +44,91 @@
|
||||
- bin/alacritty
|
||||
- share/pixmaps/Alacritty.svg
|
||||
|
||||
- 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: Finished alacritty configuration
|
||||
- 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
|
||||
@@ -109,7 +140,7 @@
|
||||
when:
|
||||
- alacritty_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + alacritty_build_deps }}"
|
||||
pkg_sys: "{{ pkg_sys + alacritty_build_deps + ['git'] }}"
|
||||
pkg_cargo_build: "{{ pkg_cargo_build + [alacritty_src_install] }}"
|
||||
|
||||
- name: Append alacritty to pkg_cask
|
||||
|
||||
Reference in New Issue
Block a user