Add gf GDB frontend with unified source tool build pattern

This commit is contained in:
Fabio Scotto di Santolo
2026-04-17 21:24:16 +02:00
parent 93b4496198
commit 0a0ce183ae
3 changed files with 57 additions and 31 deletions

View File

@@ -121,6 +121,18 @@ profile_packages:
- yaru-plus
- zstd
desktop_source_tools:
- name: st
repo: https://codeberg.org/fscotto/st
build_cmd: make
binary_name: st
install_name: st
- name: gf
repo: https://github.com/nakst/gf.git
build_cmd: ./build.sh
binary_name: gf2
install_name: gf
desktop_common_dotfiles:
- name: XDG autostart entries
src: .config/autostart/

View File

@@ -436,8 +436,6 @@
tags: [packages]
ansible.builtin.set_fact:
desktop_tools_tmp_dir: /tmp/desktop-tools
st_repo: https://codeberg.org/fscotto/st
st_src_dir: "{{ user_home }}/.local/src/st"
opencode_asset_name: >-
{{
'opencode-linux-x64-baseline.tar.gz' if ansible_facts['architecture'] == 'x86_64'
@@ -530,33 +528,10 @@
loop_control:
label: "{{ item.name }}"
- name: Clone st repository
- name: Build and install desktop source tools
tags: [packages]
ansible.builtin.git:
repo: "{{ st_repo }}"
dest: "{{ st_src_dir }}"
update: true
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
register: st_repo_state
- name: Check whether st binary is installed
tags: [packages]
ansible.builtin.stat:
path: /usr/local/bin/st
register: st_binary
- name: Build and install st
tags: [packages]
ansible.builtin.command:
cmd: make clean install
chdir: "{{ st_src_dir }}"
when: st_repo_state.changed or not st_binary.stat.exists
- name: Clean st build artifacts
tags: [packages]
ansible.builtin.command:
cmd: make clean
chdir: "{{ st_src_dir }}"
when: st_repo_state.changed or not st_binary.stat.exists
ansible.builtin.include_tasks: source_tool.yml
loop: "{{ desktop_source_tools }}"
loop_control:
loop_var: source_tool
label: "{{ source_tool.name }}"

View File

@@ -0,0 +1,39 @@
---
- name: Check installed {{ source_tool.name }} binary
ansible.builtin.stat:
path: "/usr/local/bin/{{ source_tool.install_name | default(source_tool.name) }}"
register: source_tool_installed_binary
- name: Clone {{ source_tool.name }} repository
ansible.builtin.git:
repo: "{{ source_tool.repo }}"
dest: "{{ user_home }}/.local/src/{{ source_tool.name }}"
update: true
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
register: source_tool_repo_state
- name: Check built {{ source_tool.name }} binary
ansible.builtin.stat:
path: "{{ user_home }}/.local/src/{{ source_tool.name }}/{{ source_tool.binary_name | default(source_tool.name) }}"
register: source_tool_built_binary
- name: Build {{ source_tool.name }}
ansible.builtin.command:
cmd: "{{ source_tool.build_cmd }}"
chdir: "{{ user_home }}/.local/src/{{ source_tool.name }}"
when:
- source_tool_repo_state.changed or not source_tool_built_binary.stat.exists
- name: Install {{ source_tool.name }}
ansible.builtin.copy:
src: "{{ user_home }}/.local/src/{{ source_tool.name }}/{{ source_tool.binary_name | default(source_tool.name) }}"
dest: "/usr/local/bin/{{ source_tool.install_name | default(source_tool.name) }}"
remote_src: true
owner: root
group: root
mode: "0755"
become: true
when:
- source_tool_repo_state.changed or not source_tool_installed_binary.stat.exists