Working on source packages
Signed-off-by: Matthew Stobbs <matthew@stobbs.ca>
This commit is contained in:
@@ -5,128 +5,103 @@
|
||||
- __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: v0.16.1
|
||||
alacritty_git_repo: https://github.com/alacritty/alacritty
|
||||
alacritty_pkgname: alacritty
|
||||
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: Set install type
|
||||
- name: Configure alacritty source install
|
||||
when:
|
||||
- alacritty_install_method is undefined or
|
||||
alacritty_install_method == ''
|
||||
- alacritty_install_method == "source"
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_install_method: system
|
||||
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: 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: "{{ 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
|
||||
|
||||
- name: Set alacritty install options
|
||||
- name: Set alacritty install extra build deps
|
||||
when:
|
||||
- alacritty_install_method == "source"
|
||||
- ansible_os_family == "RedHat"
|
||||
- ansible_os_major_version < 9
|
||||
block:
|
||||
- name: Set options for RedHat based Linux
|
||||
- name: Add extra dependencies for EL7
|
||||
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
|
||||
- ansible_distribution_major_version == 7
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_deps_extra: ['xcb-util-devel', '@Development Tools']
|
||||
|
||||
- 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
|
||||
- name: Add extra dependencies for EL8
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_distribution_major_version == 8
|
||||
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
|
||||
alacritty_build_deps_extra: ['@Development Tools']
|
||||
|
||||
- name: Complete alacritty configuration
|
||||
when: __alacritty_configured is undefined
|
||||
@@ -140,7 +115,7 @@
|
||||
when:
|
||||
- alacritty_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + alacritty_build_deps + ['git'] }}"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user