Working on source packages
Signed-off-by: Matthew Stobbs <matthew@stobbs.ca>
This commit is contained in:
@@ -1,36 +1,29 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Set air configuration
|
||||
- name: Set air configuration # {{{
|
||||
when:
|
||||
- __air_configured is undefined or
|
||||
not __air_configured
|
||||
block:
|
||||
- name: Set air_install_method
|
||||
- name: Set air install method
|
||||
when:
|
||||
- air_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
air_install_method: source
|
||||
air_install_method: "{% if install_method in air_install_methods %}{{ install_method }}{% else %}{{ air_install_method[0] }}{% endif %}"
|
||||
|
||||
- name: Set air version and url
|
||||
ansible.builtin.set_fact:
|
||||
air_version: "{{ air_version | default('latest') }}"
|
||||
air_url: "{{ air_url | default('github.com/air-verse/air') }}"
|
||||
air_install_url: "{{ air_install_url | default('github.com/air-verse/air') }}"
|
||||
|
||||
- name: Set air install path
|
||||
- name: Set air install package
|
||||
ansible.builtin.set_fact:
|
||||
air_pkg: "{{ air_url }}@{{ air_version }}"
|
||||
|
||||
- name: Ensure air_install_method is valid
|
||||
when:
|
||||
- air_install_method is defined
|
||||
- air_install_method not in air_install_methods
|
||||
ansible.builtin.set_fact:
|
||||
air_intall_method: air_install_methods[0]
|
||||
air_pkg: "{{ air_install_url }}@{{ air_version }}"
|
||||
|
||||
- name: Complete air configuration
|
||||
ansible.builtin.set_fact:
|
||||
__air_configured: true
|
||||
|
||||
# }}}
|
||||
- name: Append air to pkg_go
|
||||
when:
|
||||
- air_install_method == 'source'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append ansible to pkg_sys
|
||||
- name: Set maintainer
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['ansible'] }}"
|
||||
ansible_maintainers:
|
||||
- Matthew Stobbs
|
||||
- name: Configure ansible
|
||||
when:
|
||||
- __ansible_configured is undefined or
|
||||
not __ansible_configured
|
||||
block:
|
||||
- name: Set ansible install method
|
||||
when:
|
||||
- ansible_install_method is undefined
|
||||
ansible.bulitin.set_fact:
|
||||
ansible_install_method: "{% if install_method in ansible_install_methods %}{{ install_method }}{% else %}{{ ansible_install_methods[0] }}{% endif %}"
|
||||
ansible_pkgname:
|
||||
RedHat: ansible
|
||||
Debian: ansible
|
||||
Alpine: ansible
|
||||
Archlinux: ansible
|
||||
|
||||
- name: Complete ansible configuration
|
||||
ansible.builtin.set_fact:
|
||||
__ansible_configured: true
|
||||
|
||||
- name: Append ansible to system package manager install list
|
||||
when:
|
||||
- ansible_install_method == 'system'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}"
|
||||
|
||||
- name: Append ansible to pipx install list
|
||||
|
||||
@@ -1,58 +1,54 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Configure ansible-lint
|
||||
- name: Configure ansible_lint
|
||||
when:
|
||||
- __ansible_lint_configured is undefined or
|
||||
not __ansible_lint_configured
|
||||
block:
|
||||
- name: Set basic variables
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_version: latest
|
||||
ansible_lint_version: "{{ ansible_lint_version | default('latest') }}"
|
||||
|
||||
- name: Configure package options
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_install_method: "{{ ansible_lint_install_method | default(install_method) }}"
|
||||
|
||||
- name: Set pipx name
|
||||
- name: Set ansible_lint install method
|
||||
when:
|
||||
- ansible_lint_install_method == 'pipx'
|
||||
- ansible_lint_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_install_method: "{% if install_method in ansible_lint_install_methods %}{{ install_method }}{% else %}{{ ansible_lint_install_methods[0] }}{% endif %}"
|
||||
|
||||
- name: Set pipx pkgnname
|
||||
when:
|
||||
- ansible_lint_install_method == 'pipx' or
|
||||
ansible_lint_install_method == 'system_pip'
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_pkgname: "{{ 'ansible_lint' if ansible_lint_version == 'latest' else 'ansible-lint==' ~ ansible_lint_version }}"
|
||||
|
||||
- name: Set package name
|
||||
when:
|
||||
- install_method == 'system'
|
||||
block:
|
||||
- name: Set package name RedHat/Debian/Alpine/Arch distros
|
||||
when:
|
||||
- ansible_os_family in ['RedHat', 'Debian', 'Alpine', 'Archlinux']
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_pkgname: ansible-lint
|
||||
|
||||
- name: Set package name for FreeBSD
|
||||
when:
|
||||
- ansible_os_family == 'FreeBSD'
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_pkgname: py311-ansible-lint
|
||||
|
||||
- name: Ensure ansible_lint_install_method is valid
|
||||
when:
|
||||
- ansible_lint_install_method not in ansible_lint_install_methods
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_install_method: ansible_lint_install_methods[0]
|
||||
ansible_lint_pkgname:
|
||||
RedHat: ansible-lint
|
||||
Debian: ansible-lint
|
||||
Archlinux: ansible-lint
|
||||
Alpine: ansible-lint
|
||||
FreeBSD: py311-ansible-lint
|
||||
|
||||
- name: Complete ansible_lint configuration
|
||||
ansible.builtin.set_fact:
|
||||
__ansible_lint_configured: true
|
||||
|
||||
- name: Add ansible-lint to pipx install list
|
||||
- name: Add ansible_lint to pipx install list
|
||||
when:
|
||||
- ansible_lint_install_method == 'pipx'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_pipx: "{{ pkg_pipx + [ansible_lint_pkgname] }}"
|
||||
|
||||
- name: Add ansible_lint to system_pip install list
|
||||
when:
|
||||
- ansible_lint_install_method == 'system_pip'
|
||||
|
||||
- name: Append ansible-lint to system install list
|
||||
when:
|
||||
- ansible_lint_install_method == 'system'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [ansible_lint_pkgname] }}"
|
||||
pkg_sys: "{{ pkg_sys + [ansible_lint_pkgname[ansible_os_family]] }}"
|
||||
|
||||
@@ -1,16 +1,78 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Load go config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/go.yml
|
||||
|
||||
- name: Append go to pkg_archive
|
||||
- name: Configure go for install
|
||||
when:
|
||||
- go.method == 'archive'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_archive: "{{ pkg_archive + ['go'] }}"
|
||||
- __go_configured is undefined
|
||||
block:
|
||||
- name: Configure go install method
|
||||
when:
|
||||
- go_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
go_install_method: "{% if install_method in go_install_methods %}{{ install_method }}{% else %}{{ go_install_methods[0] }}{% endif %}"
|
||||
|
||||
- name: Append to pkg_sys
|
||||
- go.method != 'archive'
|
||||
- name: Configure go archive installation
|
||||
when:
|
||||
- go_install_method == 'archive'
|
||||
block:
|
||||
- name: Configure go
|
||||
ansible.builtin.set_fact:
|
||||
go_version: "{{ go_version | default('1.25.6') }}"
|
||||
go_system: "{{ ansible_system | lower }}"
|
||||
go_archmap:
|
||||
arm64: arm64
|
||||
aarch64: arm64
|
||||
x86_64: amd64
|
||||
go_install_sums:
|
||||
1.25.6:
|
||||
Darwin:
|
||||
amd64: sha256:e2b5b237f5c262931b8e280ac4b8363f156e19bfad5270c099998932819670b7
|
||||
arm64: sha256:984521ae978a5377c7d782fd2dd953291840d7d3d0bd95781a1f32f16d94a006
|
||||
Linux:
|
||||
amd64: sha256:f022b6aad78e362bcba9b0b94d09ad58c5a70c6ba3b7582905fababf5fe0181a
|
||||
arm64: sha256:738ef87d79c34272424ccdf83302b7b0300b8b096ed443896089306117943dd5
|
||||
|
||||
- name: Set go architecture
|
||||
ansible.builtin.set_fact:
|
||||
go_arch: "{{ go_archmap[ansible_architecture] }}"
|
||||
|
||||
- name: Set archive name
|
||||
ansible.builtin.set_fact:
|
||||
go_archive: "go{{ go_version }}.{{ go_system }}-{{ go_arch }}.tar.gz"
|
||||
|
||||
- name: Set go download url
|
||||
ansible.builtin.set_fact:
|
||||
go_archive_url: "https://go.dev/dl/{{ go_archive }}"
|
||||
|
||||
- name: Set archive extract location
|
||||
ansible.builtin.set_fact:
|
||||
go_extract_path: "{{ path_archive }}/go{{ go_version }}"
|
||||
|
||||
- name: Complete go archive install configuration
|
||||
ansible.builtin.set_fact:
|
||||
__go_configured: true
|
||||
go_archive_install:
|
||||
extract_path: "{{ go_extract_path }}"
|
||||
archive_url: "{{ go_archive_url }}"
|
||||
archive_name: "{{ go_archive }}"
|
||||
archive_checksum: "{{ go_install_sums[go_version][ansible_system][go_arch] }}"
|
||||
|
||||
- name: Install vis system package manager
|
||||
when:
|
||||
- go_install_method == 'system'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['go'] }}"
|
||||
|
||||
- name: Install via archive
|
||||
when:
|
||||
- go_install_method == 'archive'
|
||||
block:
|
||||
- name: Add go archive extract install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_archive: "{{ pkg_archive + [go_archive_install] }}"
|
||||
|
||||
- name: Set symbolic link to archive path
|
||||
ansible.bulitin.file:
|
||||
state: link
|
||||
force: true
|
||||
path: "{{ path_go }}"
|
||||
src: "{{ got_extract_path }}/go"
|
||||
|
||||
Reference in New Issue
Block a user