diff --git i/src/lua-factory/sources/meson.build w/src/lua-factory/sources/meson.build
index 6d66d4ef148cefde..99b408266ca23350 100644
--- i/src/lua-factory/sources/meson.build
+++ w/src/lua-factory/sources/meson.build
@@ -30,20 +30,22 @@ resources = [
     'grl-itunes-podcast',
 ]
 
+luafactoryinstalldir = join_paths(get_option('datadir'), luafactorydir)
+
 foreach s: sources
     f = s + '.lua'
     install_data(f,
-        install_dir: luafactorydir)
+        install_dir: luafactoryinstalldir)
 endforeach
 
 foreach r: resources
     input = r + '.gresource.xml'
     output = r + '.gresource'
     custom_target(output,
         output: output,
         input: input,
         install: true,
-        install_dir: luafactorydir,
+        install_dir: luafactoryinstalldir,
         command: [glib_compile_resources,
             '--sourcedir', meson.current_source_dir(),
             '--target', '@OUTPUT@',
