Skip to content

Commit a2baae1

Browse files
committed
Added support for distro version specific CPack dependencies. Should now work on Debian 12/13, but not yet updated for Ubuntu
1 parent 378ef61 commit a2baae1

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

CMakeLists.txt

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,39 @@ set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.ngscopeclient.org/")
321321
set(CPACK_THREADS 0)
322322
set(CPACK_STRIP_FILES TRUE)
323323

324-
# Debian / Ubuntu specific packaging config
325-
# Versions are based on what Bookworm is shipping as of 2024-10-30
326-
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andrew Zonenberg <andrew.zonenberg@antikernel.net>")
327-
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.36-9), libpng16-16(>= 1.6.39-2), libsigc++-2.0-0v5 (>= 2.12.0-1), libyaml-cpp0.7(>= 0.7.0), libgomp1(>= 12.2.0), libvulkan1(>= 1.3.239), libglfw3(>= 3.3.8), libgtk-3-0(>= 3.24.38), zlib1g(>= 1.2.13), libhidapi-hidraw0(>= 0.13.1), liblxi1(>= 1.18), libtirpc3 (>= 1.3.3)" )
324+
# Figure out what distro version we're on
325+
if(LINUX)
326+
find_program(LSB_RELEASE_EXEC lsb_release)
327+
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is 2>&1
328+
OUTPUT_VARIABLE DISTRO_NAME
329+
OUTPUT_STRIP_TRAILING_WHITESPACE)
330+
execute_process(COMMAND ${LSB_RELEASE_EXEC} -rs 2>&1
331+
OUTPUT_VARIABLE DISTRO_VER
332+
OUTPUT_STRIP_TRAILING_WHITESPACE)
333+
334+
message(STATUS "Linux distribution target for packaging: name ${DISTRO_NAME}, version ${DISTRO_VER}")
335+
336+
# Debian specific packaging config
337+
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andrew Zonenberg <andrew.zonenberg@antikernel.net>")
338+
if(DISTRO_NAME STREQUAL "Debian")
339+
340+
# Bookworm
341+
# Versions are based on what Bookworm is shipping as of 2024-10-30
342+
if(DISTRO_VER STREQUAL "12")
343+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.36-9), libpng16-16(>= 1.6.39-2), libsigc++-2.0-0v5 (>= 2.12.0-1), libyaml-cpp0.7(>= 0.7.0), libgomp1(>= 12.2.0), libvulkan1(>= 1.3.239), libglfw3(>= 3.3.8), libgtk-3-0(>= 3.24.38), zlib1g(>= 1.2.13), libhidapi-hidraw0(>= 0.13.1), liblxi1(>= 1.18), libtirpc3 (>= 1.3.3)" )
344+
345+
# Trixie
346+
# Versions are based on what Trixie is shipping as of 2025-09-20
347+
elseif(DISTRO_VER STREQUAL "13")
348+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.41-12), libpng16-16t64(>= 1.6.48), libsigc++-2.0-0v5 (>= 2.12.1), libyaml-cpp0.8(>= 0.8.0), libgomp1(>= 14.2.0-19), libvulkan1(>= 1.4.309.0), libglfw3(>= 3.4-3), libgtk-3-0t64(>= 3.24.49), zlib1g(>= 1:1.3.dfsg+really1.3.1-1), libhidapi-hidraw0(>= 0.14.0-1), liblxi1(>= 1.22-1), libtirpc3t64 (>= 1.3.6+ds-1)" )
349+
endif()
350+
351+
# Default Debian-derived distro settings
352+
else()
353+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.36-9), libpng16-16(>= 1.6.39-2), libsigc++-2.0-0v5 (>= 2.12.0-1), libyaml-cpp0.7(>= 0.7.0), libgomp1(>= 12.2.0), libvulkan1(>= 1.3.239), libglfw3(>= 3.3.8), libgtk-3-0(>= 3.24.38), zlib1g(>= 1.2.13), libhidapi-hidraw0(>= 0.13.1), liblxi1(>= 1.18), libtirpc3 (>= 1.3.3)" )
354+
endif()
355+
356+
endif()
328357

329358
if(APPLE)
330359
set(CPACK_BUNDLE "ON")

release-notes/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ This is a running list of significant bug fixes and new features since the last
44

55
## New features since v0.1
66

7-
* None yet
7+
* ThunderScope: updates for API changes in ThunderScope driver
88

99
## Bugs fixed since v0.1
1010

11+
* (in progress) Incorrect version dependencies on Debian/Ubuntu packages (https://github.com/ngscopeclient/scopehal-apps/issues/896)
1112
* Crash with vk::OutOfHostMemoryError when application is minimized on a Windows system with an Intel ARC GPU (https://github.com/ngscopeclient/scopehal-apps/issues/893)
1213
* Incorrect loading of CSV files with Windows line endings (https://github.com/ngscopeclient/scopehal/issues/1002)

0 commit comments

Comments
 (0)