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
This commit is contained in:
Callum Farmer 2021-08-27 10:11:08 +00:00 committed by Git OBS Bridge
parent 8737e1aad7
commit 7f706f4c55
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Aug 27 10:07:01 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- 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 <gmbr3@opensuse.org>

View File

@ -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} \