Пакет lua5.1-module-fifo: Specfile

%define target_lua_version 5.1

# Original package name fifo
%define oname fifo
%define oversion 0.2-0
%define rockspec fifo-0.2-0.rockspec
Name: lua%target_lua_version-module-%oname
Version: 0.2
Release: alt1
Summary: A lua library/'class' that implements a FIFO
License: MIT
Group: Development/Other
Url: https://github.com/daurnimator/fifo.lua
Provides: luarocks%target_lua_version(%oname) = %EVR
BuildArch: noarch

%if "%target_lua_version" == "5.3"
Obsoletes: lua-module-%oname < %EVR
Provides: lua-module-%oname = %version
%else
Obsoletes: lua5-%oname < %EVR
Provides: lua5-%oname = %version
%endif

Source: https://github.com/daurnimator/fifo.lua/archive/0.2.zip
Source1: https://luarocks.org/manifests/luarocks/fifo-0.2-0.rockspec

BuildRequires(pre): rpm-macros-lua >= 1.4
# Automatically added by buildreq on ...
BuildRequires: liblua%target_lua_version-devel lua%target_lua_version-luarocks

%add_findreq_skiplist %luarocks_dbdir/%oname/*/*/*

%description
A lua library/'class' that implements a FIFO.
Objects in the fifo can be of any type, including nil.

%prep
%setup -n fifo.lua-%version

%install
%luarocks_make %SOURCE1
%luarocks_move_docs doc

%files
%lua_modulesdir_noarch/*
%luarocks_dbdir/%oname
%doc LICENSE* README* docs_from_rockstree/*
%exclude %luarocks_dbdir/manifest

%changelog
* Sun Mar 29 2020 Alexey Shabalin <shaba@altlinux.org> 0.2-alt1
- Initial build.