Description: Adjust installation directories
Author: Stephen Kitt <skitt@debian.org>

--- a/bin/CMakeLists.txt
+++ b/bin/CMakeLists.txt
@@ -55,7 +55,7 @@
   )
   ")
 else()
-  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/xmoto.bin" DESTINATION share/xmoto)
-  install(DIRECTORY Textures/Musics DESTINATION share/xmoto/Textures)
-  install(DIRECTORY Textures/Fonts DESTINATION share/xmoto/Textures)
+  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/xmoto.bin" DESTINATION share/games/xmoto)
+  install(DIRECTORY Textures/Musics DESTINATION share/games/xmoto/Textures)
+  install(DIRECTORY Textures/Fonts DESTINATION share/games/xmoto/Textures)
 endif()
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -562,7 +562,7 @@
         MACOSX_PACKAGE_LOCATION "Resources/locale/${lang}/LC_MESSAGES"
       )
     else()
-      install(FILES "${mo}" DESTINATION share/locale/${lang}/LC_MESSAGES)
+      install(FILES "${mo}" DESTINATION share/games/locale/${lang}/LC_MESSAGES)
     endif()
 
     add_custom_command(OUTPUT "${mo}"
--- a/src/common/VFileIO.cpp
+++ b/src/common/VFileIO.cpp
@@ -1338,7 +1338,7 @@
   /* Try some default fallbacks */
   if (!m_bGotSystemDataDir) {
     const std::vector<std::string> dataDirs = {
-      "/usr/share", "/usr/local/share",
+      "/usr/share/games"
     };
     for (auto &dir : dataDirs) {
       if (isDir(dir + "/xmoto")) {
@@ -1350,7 +1350,7 @@
   }
   /* Default to /usr/share */
   if (!m_bGotSystemDataDir) {
-    m_SystemDataDir = "/usr/share";
+    m_SystemDataDir = "/usr/share/games";
   }
 
   m_SystemLocaleDir = m_SystemDataDir + "/locale";
