From 7f706f4c55e54bf1660887e0a93059733240481f902b5b59b6c9a90dc6298c47 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Fri, 27 Aug 2021 10:11:08 +0000 Subject: [PATCH 1/4] 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} \ From fb976988c4d831375dc5ab6e1662247664d331483f0a309cb3a4511a51dbe36b Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Fri, 27 Aug 2021 10:11:37 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-macros?expand=0&rev=19 --- lua-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua-macros.spec b/lua-macros.spec index 9aa8ae2..23c684e 100644 --- a/lua-macros.spec +++ b/lua-macros.spec @@ -19,7 +19,7 @@ %define _rpmmacrodir %{_rpmconfigdir}/macros.d %endif Name: lua-macros -Version: 20170611 +Version: 20210827 Release: 0 Summary: Macros for lua language License: MIT From ff9eef56b2ec8b30774980f68c8c5229b04f59e9af4a4d54d8168f010e438e3b Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Fri, 27 Aug 2021 10:11:53 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-macros?expand=0&rev=20 --- lua-macros.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/lua-macros.changes b/lua-macros.changes index 2918646..9940228 100644 --- a/lua-macros.changes +++ b/lua-macros.changes @@ -4,6 +4,7 @@ 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 +- Bump version to 20210827 ------------------------------------------------------------------- Thu Jun 10 16:58:39 UTC 2021 - Callum Farmer From 98504c24682d0582751fae9af85ca5f3d968190ba36fd017311b8826cce7bea6 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Sat, 28 Aug 2021 10:37:37 +0000 Subject: [PATCH 4/4] Accepting request 914762 from home:gmbr3:Lua - Change usage of math to string.gsub to prevent extra decimal places causing issues OBS-URL: https://build.opensuse.org/request/show/914762 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-macros?expand=0&rev=21 --- lua-macros.changes | 6 ++++++ macros.lua | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua-macros.changes b/lua-macros.changes index 9940228..3fab09e 100644 --- a/lua-macros.changes +++ b/lua-macros.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Aug 28 09:42:55 UTC 2021 - Callum Farmer + +- Change usage of math to string.gsub to prevent extra decimal + places causing issues + ------------------------------------------------------------------- Fri Aug 27 10:07:01 UTC 2021 - Callum Farmer diff --git a/macros.lua b/macros.lua index f0e0c63..92e222a 100644 --- a/macros.lua +++ b/macros.lua @@ -2,7 +2,7 @@ # The major.minor version of Lua %lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2) -%lua_version_nodots %(lua -e 'print(math.floor((%{lua_version}*10)))') +%lua_version_nodots %(lua -e 'print((string.gsub("%{lua_version}", "%.", "")))') # compiled modules should go here %lua_archdir %{_libdir}/lua/%{lua_version} @@ -14,7 +14,7 @@ %lua_incdir %{_includedir}/lua%{lua_version} %lua_version_default 5.4 -%lua_version_default_nodots %(lua -e 'print(math.floor((%{lua_version_default}*10)))') +%lua_version_default_nodots %(lua -e 'print((string.gsub("%{lua_version_default}", "%.", "")))') %ifluadefault \ %if %{lua_version_nodots} == %{lua_version_default_nodots} \