From 7f706f4c55e54bf1660887e0a93059733240481f902b5b59b6c9a90dc6298c47 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Fri, 27 Aug 2021 10:11:08 +0000 Subject: [PATCH] Accepting request 914566 from home:gmbr3:Lua - Add %lua_version_default, %lua_version_default_nodots and %ifluadefault: to allow to separate what flavour builds the documentation OBS-URL: https://build.opensuse.org/request/show/914566 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-macros?expand=0&rev=18 --- lua-macros.changes | 7 +++++++ macros.lua | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lua-macros.changes b/lua-macros.changes index 7480255..2918646 100644 --- a/lua-macros.changes +++ b/lua-macros.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Aug 27 10:07:01 UTC 2021 - Callum Farmer + +- Add %lua_version_default, %lua_version_default_nodots + and %ifluadefault: to allow to separate what flavour builds + the documentation + ------------------------------------------------------------------- Thu Jun 10 16:58:39 UTC 2021 - Callum Farmer diff --git a/macros.lua b/macros.lua index f71651d..f0e0c63 100644 --- a/macros.lua +++ b/macros.lua @@ -13,11 +13,18 @@ # lua includes folder %lua_incdir %{_includedir}/lua%{lua_version} +%lua_version_default 5.4 +%lua_version_default_nodots %(lua -e 'print(math.floor((%{lua_version_default}*10)))') + +%ifluadefault \ +%if %{lua_version_nodots} == %{lua_version_default_nodots} \ +%{nil} + # Lua default version # -e: Exclude lua prefix # -n: Specify name %lua_provides(en:) \ -%if "%{flavor}" == "lua54" \ +%ifluadefault \ %if 0%{?-n:1} \ Provides: %{-n*} = %{version}-%{release} \ Obsoletes: %{-n*} < %{version}-%{release} \