%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))" || echo 0)} %global luapkgdir %{_datadir}/lua/%{luaver} %global luacompatver 5.1 %global luacompatpkgdir %{_datadir}/lua/%{luacompatver} Name: lua-basexx Version: 0.4.0 Release: 1%{?dist} Summary: BaseXX encoding and decoding library for Lua License: MIT URL: https://github.com/aiq/basexx/ Source0: https://github.com/aiq/basexx/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: lua %description A Lua library for base2, base16, base32, base64, base85 decoding and encoding of data strings. %if 0%{?fedora} || 0%{?rhel} > 7 %package -n compat-%{name} Summary: BaseXX encoding and decoding library for Lua %{luacompatver} %description -n compat-%{name} A Lua library for base2, base16, base32, base64, base85 decoding and encoding of data strings. %endif %prep %setup -q -n basexx-%{version} %install install -D -p -m 0644 lib/basexx.lua %{buildroot}/%{luapkgdir}/basexx.lua %if 0%{?fedora} || 0%{?rhel} > 7 install -D -p -m 0644 lib/basexx.lua %{buildroot}/%{luacompatpkgdir}/basexx.lua %endif %files %doc README.adoc %license LICENSE %{luapkgdir}/basexx.lua %if 0%{?fedora} || 0%{?rhel} > 7 %files -n compat-%{name} %doc README.adoc %license LICENSE %{luacompatpkgdir}/basexx.lua %endif %changelog * Tue Apr 02 2019 Tomas Krizek - 0.4.0-1 - Initial package for Fedora 28+ and EPEL 7