File lua-compat53.spec of Package lua-bit32
%define luarocks_pkg_name compat53
%define luarocks_pkg_version 0.12-1
%define luarocks_pkg_prefix compat53-0.12-1
%define luarocks_pkg_major 0.12
%define luarocks_pkg_minor 1
Name: lua-compat53
Version: %{luarocks_pkg_major}
Release: %{luarocks_pkg_minor}
Summary: Compatibility module providing Lua-5.3-style APIs for Lua 5.2 and 5.1
Url: https://github.com/lunarmodules/lua-compat-5.3
License: MIT
Source0: compat53-0.12-1.tar.gz
Source1: compat53-0.12-1.rockspec
BuildRequires: lua-rpm-macros
Requires(postun): alternatives
Requires(post): alternatives
Provides: %{luadist %{luarocks_pkg_name} = %{luarocks_pkg_version}}
%global __luarocks_requires %{_bindir}/true
%global __luarocks_provides %{_bindir}/true
Requires: %{luadist lua >= 5.1, < 5.5}
%{?luarocks_subpackages:%luarocks_subpackages -f}
%description
This is a small module that aims to make it easier to write Lua
code in a Lua-5.3-style that runs on Lua 5.1+.
It does *not* make Lua 5.2 (or even 5.1) entirely compatible
with Lua 5.3, but it brings the API closer to that of Lua 5.3.
%prep
%autosetup -p1 -n %{luarocks_pkg_prefix}
%luarocks_prep
%generate_buildrequires
%{?luarocks_buildrequires_echo}
%if %{with check}
%luarocks_generate_buildrequires -c -b
%else
%luarocks_generate_buildrequires -b
%endif
%build
%if %{defined luarocks_subpackages_build}
%{luarocks_subpackages_build}
%else
%if %{defined luarocks_pkg_build}
%luarocks_pkg_build %{lua_version}
%else
%luarocks_build
%endif
%endif
%install
%if %{defined luarocks_subpackages_install}
%{luarocks_subpackages_install}
%else
%if %{defined luarocks_pkg_install}
%luarocks_pkg_install %{lua_version}
%else
%luarocks_install %{luarocks_pkg_prefix}.*.rock
%endif
%endif
%{?lua_generate_file_list}
%check
%if %{with check}
%{?luarocks_check}
%endif
%files %{?lua_files}%{!?lua_files:-f lua_files.list}