Skip to content

Commit

Permalink
Merge pull request #805 from BenjamenMeyer/bugfix_debian-version-file…
Browse files Browse the repository at this point in the history
…-exists_0-8-x

Bug Fix: Check for /etc/debian_version (0.8.x)
  • Loading branch information
BenjamenMeyer authored Oct 29, 2023
2 parents 0577269 + 12563e5 commit beff0dd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1402,9 +1402,16 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux)
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VEGASTRIKE_PKG_VERSION_STR}")
# Debian Version: /etc/debian_version - <name>/<junk>
IF (NOT LSB_EXISTS)
# this still needs to be true so LSB variables are not used below
# even if we don't detect the /etc/debian_version file
SET(USE_DEBIAN_VERSION TRUE)
FILE(READ "/etc/debian_version" DEBIAN_VERSION_DATA)
STRING(REGEX MATCH "^(.+)\/.*$" DEBIAN_VERSION_DATA DEBIAN_RELEASE_VERSION)
IF (EXISTS "/etc/debian_version")
FILE(READ "/etc/debian_version" DEBIAN_VERSION_DATA)
STRING(REGEX MATCH "^(.+)\/.*$" DEBIAN_VERSION_DATA DEBIAN_RELEASE_VERSION)
ELSE (EXISTS "/etc/debian_version")
MESSAGE("Detected dpkg-release but Debian Distro is unknown")
SET(DEBIAN_RELEASE_VERSION "Unknown")
ENDIF (EXISTS "/etc/debian_version")
ELSE (NOT LSB_EXISTS)
SET(USE_DEBIAN_VERSION FALSE)
SET(DEBIAN_RELEASE_VERSION "Debian Derivative Release Version ${LSB_LINUX_DISTRIBUTION_CODENAME}")
Expand Down

0 comments on commit beff0dd

Please sign in to comment.