refactored alacritty

This commit is contained in:
Matthew Stobbs
2025-03-24 21:42:43 -06:00
parent d30927930c
commit 4290535b3c
5 changed files with 33 additions and 57 deletions

View File

@@ -16,7 +16,7 @@ log_args="$log_file $log_format $log_level $log_rotate"
command_args="server $config_args $log_args -non-interactive"
depend() {
need net
need networking
}
start_pre() {
@@ -25,35 +25,4 @@ start_pre() {
--mode 0755 \
/var/log/$RC_SVCNAME
}
#
# start() {
# ebegin "Starting $RC_SVCNAME"
# start-stop-daemon --start \
# --exec $command \
# --capabilities $capabilities \
# --make-pidfile \
# --pidfile /var/run/$RC_SVCNAME.pid \
# --user $command_user:$command_group \
#
# -- \
# $command_args
#
# eend $?
# }
#
# stop() {
# ebegin "Stopping $RC_SVCNAME"
# start-stop-daemon --stop \
# --exec $command \
# --pidfile /var/run/$RC_SVCNAME.pid
#
# eend $?
# }
#
# restart() {
# ebegin "Restarting $RC_SVCNAME"
# stop()
# start()
# eend $?
# }
# vim: set filetype=sh :

View File

@@ -5,5 +5,5 @@
community.general.cargo:
name: "{{ pkg.name | default(pkg) }}"
version: "{{ pkg.vers | default(omit) }}"
path: "{{ paths.cargo | default(omit) }}"
path: "{{ path.cargo | default(path.prefix)}}"
locked: "{{ pkg.locked | default(omit) }}"

View File

@@ -1,10 +1,18 @@
# vim: set filetype=yaml.ansible :
---
- name: Set alacritty configuration
- name: Set alacritty install method
ansible.builtin.set_fact:
alacritty:
deps: "{{ pkgconfig.alacritty.build_deps[ansible_os_family] }}"
method: "{{ pkgconfig.alacritty.method[ansible_os_family] | default(pkgconfig.alacritty.method.default) }}"
- name: Set alacritty configuration
when:
- alacritty.method == 'cargo'
ansible.builtin.set_fact:
alacritty:
method: "{{ alacritty.method }}"
build_deps: "{{ pkgconfig.alacritty.build_deps[ansible_os_family] }}"
cargo:
vers: "{{ pkgconfig.alacritty.version }}"
cask: "{{ pkgconfig.alacritty.cask | default(omit) }}"
locked: true
name: alacritty

View File

@@ -1,6 +1,6 @@
# vim: set filetype=yaml.ansible :
---
- name: Add alacritty
- name: Append alacritty
when:
- alacritty_configured is undefined
block:
@@ -8,26 +8,21 @@
ansible.builtin.include_tasks:
file: config/alacritty.yml
- name: Linux based installation
when:
- ansible_system == 'Linux'
block:
- name: Append alacritty build_deps to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + alacritty.build_deps }}"
- name: Append alacritty to pkg_cargo
when:
- alacritty.method == 'cargo'
notify:
- Depend cargo
changed_when: true
ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + [alacritty] }}"
pkg_sys: "{{ pkg_sys + alacritty.build_deps }}"
pkg_cargo: "{{ pkg_cargo + [alacritty.cargo] }}"
- name: Append alacritty to pkg_cask
when:
- ansible_system == 'Darwin'
- alacritty.method == 'cask'
ansible.builtin.set_fact:
pkg_cask: "{{ pkg_cask + alacritty.cask }}"
pkg_cask: "{{ pkg_cask + ['alacritty'] }}"
- name: Set alacritty_configured
ansible.builtin.set_fact:

View File

@@ -1,5 +1,11 @@
alacritty:
version: 0.15.1
method:
default: cargo
Darwin: cask
cargo:
locked: true
name: alacritty
build_deps:
RedHat:
- cmake
@@ -24,5 +30,3 @@ alacritty:
- libxcb-dev
- libxkbcommon-dev
- pkgconf
cask:
- alacritty