Skip to content

Commit

Permalink
Debian build for Qt 5.9.1 in /opt
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaRogachev committed Nov 10, 2017
1 parent 05be37f commit cef9dd8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 7 additions & 3 deletions platforms/debian/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@
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 "[email protected]")
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})
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)
7 changes: 4 additions & 3 deletions platforms/debian/jagcs.desktop
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions platforms/debian/jagcs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
export LD_LIBRARY_PATH="/opt/Qt/5.9.1/gcc_64/lib/"
jagcs
2 changes: 2 additions & 0 deletions platforms/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
chmod 777 /usr/local/bin/jagcs.sh

0 comments on commit cef9dd8

Please sign in to comment.