ef983788060613045099d50d4e07766db77c8313 — Louis Solofrizzo 5 months ago 2f0f244
CMake: Add installation macros for all binaries and scripts

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
M CMakeLists.txt => CMakeLists.txt +1 -0
@@ 2,6 2,7 @@ # General Settings
  ###
  
+ project(kart)
  cmake_minimum_required(VERSION 3.4)
  enable_testing()
  

M bot/CMakeLists.txt => bot/CMakeLists.txt +2 -0
@@ 6,3 6,5 @@ )
  
  upload_artifacts(kart kart-bot x86_64)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kart-bot DESTINATION bin
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

M example-conf.yml => example-conf.yml +1 -1
@@ 30,7 30,7 @@ database: /var/db/kart.db.sqlite
  
  scripts:
-   directory: /usr/local/sbin/
+   directory: /usr/share/kart/scripts/
  
  web:
    port: 8080

M sorter/CMakeLists.txt => sorter/CMakeLists.txt +2 -0
@@ 7,3 7,5 @@ )
  
  upload_artifacts(kart kart-sorter x86_64)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kart-sorter DESTINATION bin
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

M web/CMakeLists.txt => web/CMakeLists.txt +4 -0
@@ 6,3 6,7 @@ )
  
  upload_artifacts(kart kart-web x86_64)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kart-web DESTINATION bin
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(DIRECTORY static DESTINATION share/kart/)
+ install(DIRECTORY views DESTINATION share/kart/)

M worker/CMakeLists.txt => worker/CMakeLists.txt +9 -0
@@ 13,3 13,12 @@ )
  
  upload_artifacts(kart kart-worker x86_64)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kart-worker DESTINATION bin
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(FILES ${CMAKE_SOURCE_DIR}/scripts/get_img_from_album_imgur.py DESTINATION share/kart/scripts/
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(FILES ${CMAKE_SOURCE_DIR}/scripts/get_link_from_gfycat_url.py DESTINATION share/kart/scripts/
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(FILES ${CMAKE_SOURCE_DIR}/scripts/set-object-acl-public-read.sh DESTINATION share/kart/scripts/
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(FILES ${CMAKE_SOURCE_DIR}/example-conf.yml DESTINATION /etc RENAME kart-worker.conf.example)