diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 1e51ab8c2..f900fe02c 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -76,10 +76,18 @@ endif () if ("${CPACK_GENERATOR}" STREQUAL "DEB") set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "@PROJECT_DESCRIPTION@") - set (CPACK_PACKAGE_FILE_NAME "@DEBIAN_PACKAGE_FILE_NAME@") + set (CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "@PROJECT_HOMEPAGE@") set (CPACK_DEBIAN_PACKAGE_DEPENDS "libgfortran3 (>=4.8.2), libqt5multimedia5-plugins (>=5), libqt5widgets5 (>=5), libc6 (>=2.19)") set (CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} Debian) endif ("${CPACK_GENERATOR}" STREQUAL "DEB") +if ("${CPACK_GENERATOR}" STREQUAL "RPM") + set (CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CPACK_RPM_PACKAGE_ARCHITECTURE}) +endif ("${CPACK_GENERATOR}" STREQUAL "RPM") + +if ("${CPACK_GENERATOR}" STREQUAL "TGZ") + set (CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.@CMAKE_SYSTEM_PROCESSOR@) +endif ("${CPACK_GENERATOR}" STREQUAL "TGZ") + message (STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") diff --git a/CMakeLists.txt b/CMakeLists.txt index 067bbcf35..40eb21653 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -945,7 +945,6 @@ else () # Derive the correct filename for a Debian package because the DEB # generator doesn't do this correctly at present. # - string (TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE) find_program (DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems") if (DPKG_PROGRAM) execute_process ( @@ -953,16 +952,14 @@ else () OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE ) - set (DEBIAN_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME_LOWERCASE}_${wsjtx_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") - else (DPKG_PROGRAM) - set (DEBIAN_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME_LOWERCASE}_${wsjtx_VERSION}_${CMAKE_SYSTEM_NAME}") + set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE noarch) endif (DPKG_PROGRAM) set (CPACK_DEBIAN_PACKAGE_PACKAGE_SHLIBDEPS ON) + set (CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) + set (CPACK_GENERATOR "DEB" "RPM" "TGZ") endif ()