Use the name "changelog.Debian.gz" instead of "changelog.gz" for the debian package's changelog.

This commit is contained in:
Username404 2021-03-25 14:28:03 +01:00
parent d3b86a3ef2
commit 1d5f2d7877
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 5 additions and 4 deletions

View File

@ -93,17 +93,18 @@ if (UNIX AND NOT MINGW)
set(CPACK_RPM_PACKAGE_LICENSE "MPL-2.0")
set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog")
if (NOT APPLE)
set(GZNAME "changelog.Debian.gz")
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
COMMAND gzip -c -k -9 "${CMAKE_CURRENT_SOURCE_DIR}/changelog" > ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${GZNAME}"
COMMAND gzip -c -k -9 "${CMAKE_CURRENT_SOURCE_DIR}/changelog" > ${CMAKE_CURRENT_BINARY_DIR}/${GZNAME}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/changelog"
COMMENT "Compressing the changelog file"
)
add_custom_target(changelog ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz")
add_custom_target(changelog ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${GZNAME}")
string(TOLOWER "${CMAKE_INSTALL_DOCDIR}" DEB_CHANGELOG_DEST_DIR) # Lowercase characters are needed because GNUInstallDirs uses the PROJECT_NAME variable.
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
FILES "${CMAKE_CURRENT_BINARY_DIR}/${GZNAME}"
DESTINATION ${DEB_CHANGELOG_DEST_DIR}
)
endif()