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
@@ -507,7 +507,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)
 
       # work around a problem where cpack thinks it's a good
       # idea to throw in the parent directories of files in
--- a/src/common/VFileIO.cpp
+++ b/src/common/VFileIO.cpp
@@ -1323,7 +1323,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")) {
@@ -1335,7 +1335,7 @@
   }
   /* Default to /usr/share */
   if (!m_bGotSystemDataDir) {
-    m_SystemDataDir = "/usr/share";
+    m_SystemDataDir = "/usr/share/games";
   }
 
   m_SystemLocaleDir = m_SystemDataDir + "/locale";
