From 6c6995ca3357cf78b1a0f45c17cf21d507824064 Mon Sep 17 00:00:00 2001 From: Andre Nijman Date: Tue, 16 Jun 2026 23:00:35 +0800 Subject: [PATCH] cmake: add Void Linux to recognized package flavors `build.sh -release` aborts on Void Linux with "Unknown Linux package flavor: void" (CMake/pkg.cmake), because Void's /etc/os-release ID is `void` and is not matched by any branch. Void has no native deb/rpm in this packaging flow, so route it to the same TGZ generator already used for Arch (both are source-based distros) and make the comment/status message distro-neutral. This lets users on Void build and install the XRT amdxdna SHIM plugin (e.g. `-nokmod` against the in-tree amdxdna driver on kernel >= 6.14). Signed-off-by: Andre Nijman --- CMake/pkg.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMake/pkg.cmake b/CMake/pkg.cmake index 8503acff6..7e3edfe73 100644 --- a/CMake/pkg.cmake +++ b/CMake/pkg.cmake @@ -121,13 +121,13 @@ elseif("${XDNA_CPACK_LINUX_PKG_FLAVOR}" MATCHES "fedora") set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/package/postinst") set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/package/prerm") endif() -elseif("${XDNA_CPACK_LINUX_PKG_FLAVOR}" MATCHES "arch") +elseif("${XDNA_CPACK_LINUX_PKG_FLAVOR}" MATCHES "arch|void") set(CPACK_GENERATOR "TGZ") - # For Arch Linux, we generate a tarball that can be repackaged into a proper - # Arch package using the provided PKGBUILD. When using the PKGBUILD, install - # hooks handle post-install/pre-remove automatically via pacman. + # Source-based distros (Arch, Void) have no native deb/rpm in this flow, so we + # generate a tarball that can be repackaged into a native package (e.g. the + # provided Arch PKGBUILD, whose install hooks handle post-install/pre-remove). set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) - message(STATUS "Arch Linux detected - generating TGZ package") + message(STATUS "Arch/Void Linux detected - generating TGZ package") if(NOT SKIP_KMOD) message(STATUS "Post-install script: ${CMAKE_CURRENT_BINARY_DIR}/package/postinst") message(STATUS "Pre-remove script: ${CMAKE_CURRENT_BINARY_DIR}/package/prerm")