Accepting request 914763 from devel:languages:lua
- Change usage of math to string.gsub to prevent extra decimal places causing issues - Add %lua_version_default, %lua_version_default_nodots and %ifluadefault: to allow to separate what flavour builds the documentation - Bump version to 20210827 OBS-URL: https://build.opensuse.org/request/show/914763 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lua-macros?expand=0&rev=7
This commit is contained in:
commit
99f5e680c8
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 28 09:42:55 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
- Change usage of math to string.gsub to prevent extra decimal
|
||||||
|
places causing issues
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
- Bump version to 20210827
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 10 16:58:39 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
Thu Jun 10 16:58:39 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
%define _rpmmacrodir %{_rpmconfigdir}/macros.d
|
%define _rpmmacrodir %{_rpmconfigdir}/macros.d
|
||||||
%endif
|
%endif
|
||||||
Name: lua-macros
|
Name: lua-macros
|
||||||
Version: 20170611
|
Version: 20210827
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Macros for lua language
|
Summary: Macros for lua language
|
||||||
License: MIT
|
License: MIT
|
||||||
|
11
macros.lua
11
macros.lua
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# The major.minor version of Lua
|
# The major.minor version of Lua
|
||||||
%lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2)
|
%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
|
# compiled modules should go here
|
||||||
%lua_archdir %{_libdir}/lua/%{lua_version}
|
%lua_archdir %{_libdir}/lua/%{lua_version}
|
||||||
@ -13,11 +13,18 @@
|
|||||||
# lua includes folder
|
# lua includes folder
|
||||||
%lua_incdir %{_includedir}/lua%{lua_version}
|
%lua_incdir %{_includedir}/lua%{lua_version}
|
||||||
|
|
||||||
|
%lua_version_default 5.4
|
||||||
|
%lua_version_default_nodots %(lua -e 'print((string.gsub("%{lua_version_default}", "%.", "")))')
|
||||||
|
|
||||||
|
%ifluadefault \
|
||||||
|
%if %{lua_version_nodots} == %{lua_version_default_nodots} \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
# Lua default version
|
# Lua default version
|
||||||
# -e: Exclude lua prefix
|
# -e: Exclude lua prefix
|
||||||
# -n: Specify name
|
# -n: Specify name
|
||||||
%lua_provides(en:) \
|
%lua_provides(en:) \
|
||||||
%if "%{flavor}" == "lua54" \
|
%ifluadefault \
|
||||||
%if 0%{?-n:1} \
|
%if 0%{?-n:1} \
|
||||||
Provides: %{-n*} = %{version}-%{release} \
|
Provides: %{-n*} = %{version}-%{release} \
|
||||||
Obsoletes: %{-n*} < %{version}-%{release} \
|
Obsoletes: %{-n*} < %{version}-%{release} \
|
||||||
|
Loading…
Reference in New Issue
Block a user