SHA256
10
0
forked from pool/lua-macros

Fix %luarocks_* macros.

This commit is contained in:
2025-10-15 01:16:16 +02:00
parent 8ee4d34fad
commit 6e7d7d058f
2 changed files with 14 additions and 5 deletions

View File

@@ -89,11 +89,15 @@ Obsoletes: lua-%{mod_name} < %{version}-%{release}
%endif
]])
}
# LuaRocks
%luarocks_build \
luarocks --lua-version "%{lua_version}" \\\
make --deps-mode none
%luarocks_install \
luarocks --lua-version="%{lua_version}" --tree="%{buildroot}%{_prefix}" \\\
install --deps-mode=none --no-manifest
luarocks --lua-version "%{lua_version}" make --deps-mode none --pack-binary-rock
%luarocks_treedir %{_prefix}/lib/luarocks/rocks-%{lua_version}
%luarocks_install \
/bin/sh -c 'luarocks --lua-version="%{lua_version}" --tree="%{buildroot}%{_prefix}" install --deps-mode=none --no-manifest "$@" && \
source_dir="%{buildroot}%{luarocks_treedir}/%{mod_name}/%{rock_version}" && \
[ -d "${source_dir}" ] && [ "$(ls -A "${source_dir}" | wc -l)" -gt 0 ] && \
mv -v "${source_dir}" __rocktree' --