lua/macros.lua
Björn Esser 62bbfe64a1 Refactor macros to a more common syntax
Use rpm's build-in lua for macros
2017-05-28 10:48:02 +02:00

14 lines
375 B
Lua

%lua_version %{lua: print(string.sub(_VERSION, 5))}
%lua_libdir %{_libdir}/lua/%{lua_version}
%lua_pkgdir %{_datadir}/lua/%{lua_version}
%lua_requires \
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7 \
Requires: lua(abi) = %{lua_version} \
%else \
Requires: lua >= %{lua_version} \
Requires: lua < %{lua: os.setlocale('C'); print(string.sub(_VERSION, 5) + 0.1)} \
%endif \
%{nil}