diff --git a/luarocks.spec b/luarocks.spec index ffbcfb9fbeeb832c195f69eb2dfe6f5770b22f6a..3b8a3bf74706c81f9aa91a4974e569a1946db356 100644 --- a/luarocks.spec +++ b/luarocks.spec @@ -1,5 +1,14 @@ +%ifarch x86_64 aarch64 +%bcond_without openresty_luajit +%else +%bcond_with openresty_luajit +%endif +%if 0%{with openresty_luajit} # Use luajit within openresty, which is compatible with lua 5.1 %global lua_version 5.1 +%else +%global lua_version 5.4 +%endif %{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}} # Use luajit within openresty to build luarocks @@ -8,7 +17,7 @@ Name: luarocks Version: 3.5.0 -Release: 2 +Release: 3 Summary: A deployment and management system for Lua modules License: MIT @@ -19,13 +28,21 @@ Patch0: 0001-luarocks-3.5.0-dynamic_libdir.patch BuildArch: noarch BuildRequires: make +%if 0%{with openresty_luajit} BuildRequires: openresty-openssl111-devel >= 1.1.1h-1 BuildRequires: openresty >= 1.19.3.1-1 +%else +BuildRequires: lua-devel +%endif Requires: unzip Requires: zip +%if 0%{with openresty_luajit} Requires: openresty-openssl111 >= 1.1.1h-1 Requires: openresty >= 1.19.3.1-1 +%else +Requires: lua-devel +%endif %description @@ -46,7 +63,10 @@ repositories, and multiple local rocks trees. ./configure \ --prefix=%{_prefix} \ --lua-version=%{lua_version} \ +%if 0%{with openresty_luajit} --with-lua=%{openresty_luajit} +%endif + %make_build %install @@ -71,6 +91,9 @@ mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version} %changelog +* Fri Aug 18 2023 panchenbo - 3.5.0-3 +- KYOS-F: add bcond openresty_luajit and loongarch64 sw_64 use lua-devel + * Thu Mar 24 2022 liyanan - 3.5.0-2 - remove %dist