Standardizing Package names

: Enables standards compliant package naming for debian and rpm

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
Change-Id: I177af15ec7a3f909d05135be30a0acc7b0b20745


[ROCm/ROCR-Runtime commit: aefc173da4]
Dieser Commit ist enthalten in:
Ashutosh Mishra verfasst und Ashutosh Mishra committed 2020-11-11 00:37:20 -05:00
1 Ursprung 349fe6a583
Commit 5026ed2f8a
2 Dateien geändert
+92 -75

Keine Dateien entsprechen Ihrer Suche

+23
Datei anzeigen
@@ -114,3 +114,26 @@ function ( get_version DEFAULT_VERSION_STRING )
set( VERSION_BUILD "${VERSION_BUILD}" PARENT_SCOPE )
endfunction()
#get the OS version
function(get_os_info)
if( EXISTS "/etc/os-release")
file(STRINGS "/etc/os-release" DISTRO_ID REGEX "^ID=")
file(STRINGS "/etc/os-release" DISTRO_RELEASE REGEX "^VERSION_ID=")
string(REPLACE "ID=" "" DISTRO_ID "${DISTRO_ID}")
string(REPLACE "VERSION_ID=" "" DISTRO_RELEASE "${DISTRO_RELEASE}")
message(STATUS "Detected distribution: ${DISTRO_ID}:${DISTRO_RELEASE}")
elseif(EXISTS "/etc/centos-release" )
# Example: CentOS release 6.10 (Final)
file(STRINGS "/etc/centos-release" DISTRO_FULL_STR REGEX "release")
string(REGEX MATCH "^[a-zA-Z]+" DISTRO_ID "${DISTRO_FULL_STR}")
string(TOLOWER "${DISTRO_ID}" DISTRO_ID)
string(REGEX MATCH "[0-9]+" DISTRO_RELEASE "${DISTRO_FULL_STR}")
message(STATUS "Detected distribution: ${DISTRO_ID}:${DISTRO_RELEASE}")
else()
message(STATUS "Not able to detect OS")
endif()
set(DISTRO_ID "${DISTRO_ID}" PARENT_SCOPE )
set(DISTRO_RELEASE "${DISTRO_RELEASE}" PARENT_SCOPE )
endfunction()