From 22fe4289a4dd4172fdc14a93c115ccb2064078b5c7cc2fe0b4e1613675be75b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Fri, 10 Oct 2025 12:56:20 +0200 Subject: [PATCH] Make %{lua_noarchdir} work even without lua-devel installed. --- lua-macros.changes | 5 +++++ macros.lua | 8 ++++++++ 2 files changed, 13 insertions(+) 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)