diff --git a/lua-macros.changes b/lua-macros.changes index 7283f75..05499ab 100644 --- a/lua-macros.changes +++ b/lua-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 10 10:56:01 UTC 2025 - Matej Cepl + +- Make %{lua_noarchdir} work even without lua-devel installed. + ------------------------------------------------------------------- Thu Oct 9 22:44:04 UTC 2025 - Matej Cepl diff --git a/macros.lua b/macros.lua index 5c23f1f..7d19cad 100644 --- a/macros.lua +++ b/macros.lua @@ -8,7 +8,15 @@ %lua_archdir %(pkgconf --variable=INSTALL_CMOD lua) # pure Lua modules should go here +local f = io.popen("pkgconf --variable=INSTALL_LMOD lua") +local output = f:read("*a") +f:close() + +if output:len() == 0 then +%lua_noarchdir %{_datadir}/lua/%{lua_version}/luacheck/ +else %lua_noarchdir %(pkgconf --variable=INSTALL_LMOD lua) +end # lua includes folder %lua_incdir %(pkgconf --variable=includedir lua)