--- scripts/xdg-mime.in.orig	2019-01-08 19:02:17 UTC
+++ scripts/xdg-mime.in
@@ -318,7 +318,7 @@ defapp_fallback()
     [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
 
     xdg_system_dirs="$XDG_DATA_DIRS"
-    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=%%LOCALBASE%%/share/:/usr/share/
 
     preference=-1
     desktop_file=""
@@ -401,7 +401,7 @@ defapp_generic()
     xdg_user_dir="$XDG_DATA_HOME"
     [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
     xdg_system_dirs="$XDG_DATA_DIRS"
-    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=%%LOCALBASE%%/share/:/usr/share/
 
     local oldifs="$IFS" dir
 
@@ -702,7 +702,7 @@ xdg_user_dir="$XDG_DATA_HOME"
 xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
 
 xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+[ -n "$xdg_system_dirs" ] || xdg_system_dirs=%%LOCALBASE%%/share/:/usr/share/
 for x in `echo $xdg_system_dirs | sed 's/:/ /g'`; do
     if [ -w $x/$xdg_dir_name ] ; then
         [ x"$mode" = x"system" ] && xdg_base_dir="$x/mime"
@@ -734,7 +734,7 @@ DEBUG 3 "kde_global_dir: $kde_global_dir"
 # TODO: Gnome legacy support
 # See http://forums.fedoraforum.org/showthread.php?t=26875
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
+gnome_global_dir=%%LOCALBASE%%/share/gnome/apps
 [ -w $gnome_global_dir ] || gnome_global_dir=
 DEBUG 3 "gnome_user_dir: $gnome_user_dir"
 DEBUG 3 "gnome_global_dir: $gnome_global_dir"
