WIP: migrate every package to a single file style #1

Draft
stobbsm wants to merge 48 commits from move_to_single_file_pkgs into main
5 changed files with 14 additions and 10 deletions
Showing only changes of commit c97dfa1aa3 - Show all commits

View File

@@ -11,7 +11,7 @@
ansible.builtin.debug:
var: pkg
- name: Install with cargo
- name: Install with cargo {{ pkg.name }}
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
community.general.cargo:

View File

@@ -12,7 +12,7 @@
## locked: _bool_ optional, default 'false'
## build_flags: _list[str]_ optional. If set, will append these to the build command
---
- name: Cargo source install helper
- name: Cargo source install helper {{ pkg.name | default(omit) }}
block:
- name: Fetch git repo
vars:
@@ -32,7 +32,7 @@
path: "{{ install_prefix }}"
name: "{{ pkg.name }}"
version: "{{ pkg.version }}"
locked: "{{ pkg.locked }}"
locked: "{{ pkg.locked | default(false) }}"
- name: Clean existing install
vars:

View File

@@ -107,7 +107,7 @@
ansible.builtin.include_tasks: helpers/cargo.yml
- name: Install cargo_build packages
loop: "{{ pkg_cargo_build }}"
loop: "{{ pkg_cargo_build | unique }}"
loop_control:
loop_var: pkg
ansible.builtin.include_tasks: helpers/cargo_build.yml

View File

@@ -2,7 +2,7 @@
#
## Package: alacritty
## Description: GPU accelerated terminal emulator written in rust
## Version: v0.16.1
## Version: 0.16.1
## Methods: [source, system]
## Helpers: cargo_build
---
@@ -13,12 +13,14 @@
- source
- system
build_flags: "{{ alacritty_build_flags | default( ['--release'] ) }}"
version: "{{ alacritty_version | default('v0.16.1') }}"
version: "{{ alacritty_version | default('0.16.1') }}"
pkgname:
RedHat: alacritty
Debian: alacritty
Alpine: alacritty
git_repo: https://github.com/alacritty/alacritty
git:
repo: https://github.com/alacritty/alacritty
version: "{{ alacritty_version | default('v0.16.1') }}"
install_files:
- from: target/release/alacritty
to: bin/alacritty
@@ -95,6 +97,7 @@
- alacritty_imethod is undefined
ansible.builtin.set_fact:
alacritty_imethod: "{{ imethod if imethod in alacritty.methods else alacritty.methods[0] }}"
- name: Configure alacritty source install # {{{
when:
- alacritty_imethod == "source"
@@ -104,9 +107,10 @@
alacritty_src_install:
build_flags: "{{ alacritty.build_flags }}"
source_dir: "{{ d_cache.path }}/alacritty"
repo: "{{ alacritty.git_repo }}"
version: "{{ alacritty.version }}"
repo: "{{ alacritty.git.repo }}"
version: "{{ alacritty.git.version }}"
files: "{{ alacritty.install_files }}"
name: alacritty
alacritty_bds: "{{ alacritty.bds[os_family] }}"
- name: Set alacritty install extra build deps

View File

@@ -77,7 +77,7 @@
- name: Append yazi to pkg_cargo_build
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + yazi.build_depends[ansible_os_family] }}"
pkg_cargo_build: "{{ pkg_cargo + [ yazi_src_install ] }}"
pkg_cargo_build: "{{ pkg_cargo_build + [ yazi_src_install ] }}"
yazi_install: "{{ yazi_imethod }}={{ yazi_src_install }}"
- name: Finalise yazi configuration