From 21b379c73632523adddb0eb04153ba52360d8f193bf7c9c6de32053ee76a9199 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Fri, 2 Sep 2022 15:13:59 +0000 Subject: [PATCH] Accepting request 1000926 from home:gmbr3:Lua - Add LuaRocks macros: * %luarocks_build * %luarocks_install * %luarocks_treedir OBS-URL: https://build.opensuse.org/request/show/1000926 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-macros?expand=0&rev=22 --- lua-macros.changes | 8 ++++++++ macros.lua | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/lua-macros.changes b/lua-macros.changes index 3fab09e..f7db647 100644 --- a/lua-macros.changes +++ b/lua-macros.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 2 15:13:06 UTC 2022 - Callum Farmer + +- Add LuaRocks macros: + * %luarocks_build + * %luarocks_install + * %luarocks_treedir + ------------------------------------------------------------------- Sat Aug 28 09:42:55 UTC 2021 - Callum Farmer diff --git a/macros.lua b/macros.lua index 92e222a..3230b68 100644 --- a/macros.lua +++ b/macros.lua @@ -39,3 +39,14 @@ Obsoletes: lua-%{mod_name} < %{version}-%{release} \ %endif \ %endif \ %{nil} + +# LuaRocks +%luarocks_build \ +luarocks --lua-version "%{lua_version}" \\\ +make --pack-binary-rock --deps-mode none + +%luarocks_install \ +luarocks --lua-version="%{lua_version}" --tree="%{buildroot}%{_prefix}" \\\ +install --deps-mode=none --no-manifest + +%luarocks_treedir %{_prefix}/lib/luarocks/rocks-%{lua_version}