From 452eeccc7460d5bd427ca21c9e47f89b953d9e28 Mon Sep 17 00:00:00 2001 From: SB Date: Mon, 28 Sep 2026 06:45:08 -0400 Subject: [PATCH] Add metadata to CPack RPM packages --- CMakeLists.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec0f92aea..da178b1de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)