diff --git a/CMakeLists.txt b/CMakeLists.txt index 0898cc6d..4052c41b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ endif() option(WITH_DEBIAN "Include instructions to make Debian package") if (WITH_DEBIAN) # https://cmake.org/Bug/view.php?id=14444 - install(TARGETS ${PROJECT} DESTINATION "/usr/bin") + install(TARGETS ${PROJECT} DESTINATION "/usr/local/bin/") add_subdirectory(platforms/debian) endif (WITH_DEBIAN) diff --git a/platforms/debian/CMakeLists.txt b/platforms/debian/CMakeLists.txt index 62f514f3..3337980d 100644 --- a/platforms/debian/CMakeLists.txt +++ b/platforms/debian/CMakeLists.txt @@ -2,17 +2,21 @@ cmake_minimum_required(VERSION 3.0) # Install debian instructions -install(FILES "jagcs.desktop" DESTINATION "/usr/share/applications/") -install(FILES "../../resources/icons/jagcs.svg" DESTINATION "/usr/share/icons/") +install(FILES "jagcs.sh" DESTINATION "/usr/local/bin/") +install(FILES "jagcs.desktop" DESTINATION "/usr/local/share/applications/") +install(FILES "../../resources/icons/jagcs.svg" DESTINATION "/usr/local/share/icons/") # CPack generator type set(CPACK_GENERATOR "DEB") # Package information set(CPACK_PACKAGE_NAME "JAGCS") +set(CPACK_PACKAGE_ICON "../../resources/icons/jagcs.svg") + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Just Another Ground Control Station") set(CPACK_PACKAGE_CONTACT "mishkarogachev@gmail.com") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/MishkaRogachev/JAGCS") +set(CPACK_DEBIAN_PACKAGE_SECTION "Science") # Set package version set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) @@ -20,7 +24,7 @@ set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) # Scripts -#set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst") +set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst") # This must always be last! include(CPack) diff --git a/platforms/debian/jagcs.desktop b/platforms/debian/jagcs.desktop old mode 100644 new mode 100755 index 11968b81..4b88f15b --- a/platforms/debian/jagcs.desktop +++ b/platforms/debian/jagcs.desktop @@ -1,9 +1,10 @@ +#!/usr/bin/env xdg-open [Desktop Entry] Type=Application Name=JAGCS GenericName=jagcs -Exec=jagcs +Exec=/usr/local/bin/jagcs.sh Terminal=false -Categories=Education;Robotics; +Categories=Science;Robotics; Comment=Just Another Ground Station -Icon=/usr/share/icons/jagcs.svg +Icon=/usr/local/share/icons/jagcs.svg diff --git a/platforms/debian/jagcs.sh b/platforms/debian/jagcs.sh new file mode 100755 index 00000000..0599e478 --- /dev/null +++ b/platforms/debian/jagcs.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export LD_LIBRARY_PATH="/opt/Qt/5.9.1/gcc_64/lib/" +jagcs diff --git a/platforms/debian/postinst b/platforms/debian/postinst new file mode 100755 index 00000000..dc24d76b --- /dev/null +++ b/platforms/debian/postinst @@ -0,0 +1,2 @@ +#!/bin/bash +chmod 777 /usr/local/bin/jagcs.sh