diff options
-rw-r--r-- | src/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 14cc2a7..088f7c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,6 +57,9 @@ INSTALL(TARGETS emuchooser RUNTIME DESTINATION bin) ### BUILD PACKAGE ############################################################## +execute_process(COMMAND lsb_release -cs OUTPUT_VARIABLE distro_shortname OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE distro_arch OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CPACK_GENERATOR "DEB") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Sebastian Schmelzer <ssc@xss.nu>") #required set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "emuchooser") @@ -66,8 +69,8 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtcore4") set(CPACK_DEBIAN_PACKAGE_SECTION "misc") set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") set(CPACK_PACKAGE_NAME "emuchooser") -set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") -set(CPACK_PACKAGE_FILE_NAME "emuchooser_${CPACK_PACKAGE_VERSION}_ubuntu_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${distro_arch}") +set(CPACK_PACKAGE_FILE_NAME "emuchooser_${CPACK_PACKAGE_VERSION}_${distro_shortname}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "emuchooser_${CPACK_PACKAGE_VERSION}") INCLUDE(CPack) |