SHA256
10
0
forked from pool/lua-macros

Accepting request 1312655 from devel:languages:lua

- Rewrite %luarocks_install to use a shell script
  install-lua-rock.sh, which is packaged as well.

OBS-URL: https://build.opensuse.org/request/show/1312655
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lua-macros?expand=0&rev=14
This commit is contained in:
2025-10-23 14:35:38 +00:00
committed by Git OBS Bridge
parent 1f556cc5a6
commit 89a02f3b9c
5 changed files with 16 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
mtime: 1760490299
commit: 6e7d7d058fabe7a87a7d0775b7affde240ffd6983b3632535beb5ff5083018ff
mtime: 1760999899
commit: d1f0f1035bb04d30b4b3f2362fd2a8fa757179cdb184b24e5b6d27f1245ff673
url: https://src.opensuse.org/lua/lua-macros.git
revision: 6e7d7d058fabe7a87a7d0775b7affde240ffd6983b3632535beb5ff5083018ff
revision: d1f0f1035bb04d30b4b3f2362fd2a8fa757179cdb184b24e5b6d27f1245ff673
projectscmsync: https://src.opensuse.org/lua/_ObsPrj.git

BIN
build.specials.obscpio (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 20 21:30:36 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Rewrite %luarocks_install to use a shell script
install-lua-rock.sh, which is packaged as well.
-------------------------------------------------------------------
Tue Oct 14 23:16:09 UTC 2025 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -27,6 +27,7 @@ License: MIT
Group: Development/Languages/Other
URL: https://www.lua.org
Source0: macros.lua
Source1: install-lua-rock.sh
%if 0%{?suse_version} > 1600
Requires: lua-interpreter
%elif 0%{?suse_version} >= 1500
@@ -46,9 +47,11 @@ cp -p %{SOURCE0} .
:
%install
install -Dm644 macros.lua %{buildroot}%{_rpmmacrodir}/macros.lua
install -Dm644 %{SOURCE0} %{buildroot}%{_rpmmacrodir}/macros.lua
install -Dm755 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/install-lua-rock.sh
%files
%{_rpmmacrodir}/macros.lua
%{_rpmconfigdir}/install-lua-rock.sh
%changelog

View File

@@ -97,7 +97,4 @@ 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' --
%{_rpmconfigdir}/install-lua-rock.sh "%{lua_version}" "%{buildroot}%{_prefix}" "%{buildroot}%{luarocks_treedir}/%{mod_name}"