The shipped irserver is a 32-bit ARM binary linked against libzip.so.4, which only exists on armhf with Debian 12 or older. On a 64-bit userland or trixie it cannot run, so the role now compiles the bundled 2019 sources on the device there, with GCC 14's new hard errors (implicit declarations, implicit int, pointer/int mix-ups) downgraded rather than the old code patched. Picked from `dpkg --print-architecture` and the distribution version; `pi_irserver_build_from_source: true|false` forces it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
---
|
|
- name: Get the userland architecture
|
|
# See pi_squeezelite_custom: the kernel's architecture is not the userland's.
|
|
ansible.builtin.command: dpkg --print-architecture
|
|
register: pi_irserver_dpkg_arch
|
|
changed_when: false
|
|
check_mode: false # read-only
|
|
- name: Decide between the prebuilt binary and a build on the device
|
|
ansible.builtin.set_fact:
|
|
pi_irserver_build: >-
|
|
{{ (pi_irserver_build_from_source | string | lower == 'true')
|
|
or (pi_irserver_build_from_source | string | lower == 'auto'
|
|
and (pi_irserver_dpkg_arch.stdout | trim != 'armhf'
|
|
or ansible_facts.distribution_major_version | int >= 13)) }}
|
|
- name: Copy prebuilt irserver (32-bit ARM binary)
|
|
ansible.builtin.copy:
|
|
src: irserver
|
|
dest: /usr/bin/irserver
|
|
mode: u+rx
|
|
notify: Restart irserver
|
|
when: not pi_irserver_build
|
|
- name: Build irserver from source (needed on a 64-bit userland, see README)
|
|
ansible.builtin.include_tasks: build.yml
|
|
when: pi_irserver_build
|
|
- name: Make config dir for remotes
|
|
ansible.builtin.file:
|
|
path: /usr/bin/remotes
|
|
state: directory
|
|
mode: "0755"
|
|
- name: Copy hauppauge remote
|
|
ansible.builtin.copy:
|
|
src: hauppauge.rem
|
|
dest: /usr/bin/remotes/
|
|
mode: "0644"
|
|
notify: Restart irserver
|
|
- name: Copy irserver systemd file
|
|
ansible.builtin.copy:
|
|
src: irserver.service
|
|
dest: /lib/systemd/system/
|
|
mode: "0644"
|
|
notify: Restart irserver
|
|
- name: Enable irserver autostart
|
|
ansible.builtin.systemd:
|
|
name: irserver
|
|
state: started
|
|
enabled: "yes"
|
|
daemon_reload: "yes"
|
|
- name: Add irserver to sysdweb
|
|
ansible.builtin.include_role:
|
|
name: pi_sysdweb
|
|
vars:
|
|
pi_sysdweb_name: irserver
|