Add metadata to CPack RPM packages

This commit is contained in:
SB
2026-09-28 07:56:26 -04:00
committed by Stephen C. Wills
parent cbdfd03986
commit 452eeccc74
+19 -1
View File
@@ -191,7 +191,7 @@ endif()
# By default, devilutionx.mpq and mods/hf.mpq are built only if smpq is installed and MPQ support is enabled.
if(SUPPORTS_MPQ AND NOT UNPACKED_MPQS)
if(BUILD_ASSETS_MPQ OR (CPACK STREQUAL "ON" AND (WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")))
if(BUILD_ASSETS_MPQ OR (CPACK STREQUAL "ON" AND (WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux") AND NOT SRC_DIST))
find_program(SMPQ smpq REQUIRED)
elseif(NOT DEFINED BUILD_ASSETS_MPQ AND NOT SRC_DIST)
find_program(SMPQ smpq)
@@ -669,6 +669,9 @@ if(CPACK AND (APPLE OR BUILD_ASSETS_MPQ OR SRC_DIST))
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
string(TOLOWER ${PROJECT_NAME} project_name)
set(CPACK_PACKAGE_NAME ${project_name})
set(CPACK_PACKAGE_VENDOR "DevilutionX contributors")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open-source Diablo and Hellfire engine")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/diasurgical/DevilutionX")
set(CPACK_GENERATOR "7Z")
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackProjectConfig.cmake")
@@ -740,6 +743,21 @@ if(CPACK AND (APPLE OR BUILD_ASSETS_MPQ OR SRC_DIST))
# -G RPM
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
set(CPACK_RPM_PACKAGE_SUMMARY "Open-source implementation of the Diablo and Hellfire game engine")
if(DISCORD_INTEGRATION)
set(CPACK_RPM_PACKAGE_LICENSE "LicenseRef-Sustainable-Use AND LicenseRef-Discord-Game-SDK")
set(_rpm_package_discord_notice " Discord Game SDK terms also apply.")
else()
set(CPACK_RPM_PACKAGE_LICENSE "LicenseRef-Sustainable-Use")
set(_rpm_package_discord_notice "")
endif()
set(CPACK_RPM_PACKAGE_DESCRIPTION
"DevilutionX is an open-source implementation of the Diablo and Hellfire game engine. The project is licensed under the Sustainable Use License, which restricts use and distribution to non-commercial purposes.${_rpm_package_discord_notice} Original commercial game data is not included."
)
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
set(CPACK_RPM_PACKAGE_URL "https://github.com/diasurgical/DevilutionX")
set(CPACK_RPM_PACKAGE_RELEASE 1)
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
find_program(RPMBUILD rpmbuild)
if(RPMBUILD)