File lua-bit32.spec of Package lua-bit32
%define luarocks_pkg_name bit32
%define luarocks_pkg_version 0.12-1
%define luarocks_pkg_prefix bit32-0.12-1
%define luarocks_pkg_major 0.12
%define luarocks_pkg_minor 1
Name: lua-bit32
Version: %{luarocks_pkg_major}
Release: %{luarocks_pkg_minor}
Summary: Lua 5.2 bit manipulation library
Url: http://www.lua.org/manual/5.2/manual.html#6.7
License: MIT
Source0: bit32-0.12-1.tar.gz
Source1: bit32-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
bit32 is the native Lua 5.2 bit manipulation library, in the version
from Lua 5.3; it is compatible with Lua 5.1, 5.2 and 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}