summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 96d2d5e..4bedb99 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -39,6 +39,9 @@ set(CPACK_COMPONENT_LIBS_GROUP "core")
set(CPACK_COMPONENT_DEV_GROUP "dev")
set(CPACK_COMPONENT_DEV_DEPENDS libs)
+execute_process(COMMAND lsb_release -cs OUTPUT_VARIABLE distro_shortname OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND arch 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 "Library for vmchooser and emuchooser..")
@@ -48,8 +51,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 "libChooser")
-set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
-set(CPACK_PACKAGE_FILE_NAME "libChooser_${CPACK_PACKAGE_VERSION}_ubuntu_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
+set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${distro_arch}")
+set(CPACK_PACKAGE_FILE_NAME "libChooser_${CPACK_PACKAGE_VERSION}_${distro_shortname}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "libChooser_${CPACK_PACKAGE_VERSION}")