diff --git a/.files b/.files new file mode 100644 index 0000000..a50b8f5 Binary files /dev/null and b/.files differ diff --git a/.meta b/.meta new file mode 100644 index 0000000..cd85d99 --- /dev/null +++ b/.meta @@ -0,0 +1,11 @@ + + A Lua REPL implemented in Lua for embedding in other programs + This project has two uses: +- An alternative to the standalone interpreter included with Lua, one that +supports things like plugins, tab completion, and automatic insertion of +return in front of expressions. +- A REPL library you may embed in your application, to provide all of the +niceties of the standalone interpreter included with Lua and then some. + + https://github.com/hoelzro/lua-repl + diff --git a/.rev b/.rev new file mode 100644 index 0000000..ac2c3dd --- /dev/null +++ b/.rev @@ -0,0 +1,10 @@ + + + 3c89471c4ce6e7a5adc6a5cda258b266 + 0.10 + + dimstar_suse + New Package + 1004030 + + diff --git a/.servicemark b/.servicemark new file mode 100644 index 0000000..4c0a5e7 --- /dev/null +++ b/.servicemark @@ -0,0 +1 @@ +1e8f36a0eb6808f8c0fffa481daa22ba diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..d13a744 --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + +lua51 +lua53 +lua54 + diff --git a/_service b/_service new file mode 100644 index 0000000..2beb6de --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + https://github.com/hoelzro/lua-repl + @PARENT_TAG@ + git + d67da674dac07597eb914d471237414b1c662a65 + (\d+.\d+) + \1 + + + + *.tar + xz + + + + diff --git a/lua-luarepl.changes b/lua-luarepl.changes new file mode 100644 index 0000000..7b741d6 --- /dev/null +++ b/lua-luarepl.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Thu Aug 25 04:26:47 UTC 2022 - Gordon Leung + +- initial commit diff --git a/lua-luarepl.spec b/lua-luarepl.spec new file mode 100644 index 0000000..5070a67 --- /dev/null +++ b/lua-luarepl.spec @@ -0,0 +1,108 @@ +# +# spec file +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%bcond_without test +%define flavor @BUILD_FLAVOR@ +%define mod_name luarepl +%define lua_value %(echo "%{flavor}" |sed -e 's:lua::') +%define rock_version 0.10-1 +Version: 0.10 +Release: 0 +Summary: A Lua REPL implemented in Lua for embedding in other programs +License: MIT +Group: Development/Languages/Other +URL: https://github.com/hoelzro/lua-repl +Source: lua-repl-%{version}.tar.xz +BuildRequires: %{flavor}-luarocks +BuildRequires: %{flavor}-devel +%if %{with test} +BuildRequires: perl +BuildRequires: %{flavor}-testmore +%endif +Requires: %{flavor} +Requires: bash-sh +# https://github.com/hoelzro/lua-repl#recommended-packages +Recommends: %{flavor}-linenoise +# Enable filename_completion plugin +Suggests: %{flavor}-filesystem +%lua_provides +%if "%{flavor}" == "" +Name: lua-%{mod_name} +ExclusiveArch: do_not_build +%else +Name: %{flavor}-%{mod_name} +%endif +BuildArch: noarch +Requires(post): update-alternatives +Requires(postun):update-alternatives + +%description +This project has two uses: +- An alternative to the standalone interpreter included with Lua, one that +supports things like plugins, tab completion, and automatic insertion of +return in front of expressions. +- A REPL library you may embed in your application, to provide all of the +niceties of the standalone interpreter included with Lua and then some. + +%prep +%autosetup -n lua-repl-%{version} +# Fix the Lua shebang of rep.lua script +sed -i -r '1s/env (lua)/\1%{lua_version}/' rep.lua + +%build +%luarocks_build "%{mod_name}-%{rock_version}.rockspec" + +%install +%luarocks_install *.rock + +# Version the rep.lua file +sed -i -r -e "s#%{buildroot}##" -e "s#(/bin/rep.lua)#\1-%{lua_version}#" \ + "%{buildroot}/usr/bin/rep.lua" +mv %{buildroot}%{_bindir}/rep.lua{,-%{lua_version}} + +# update-alternatives +mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ +touch %{buildroot}%{_sysconfdir}/alternatives/rep.lua +ln -sf %{_sysconfdir}/alternatives/rep.lua %{buildroot}%{_bindir}/rep.lua +mkdir -p %{buildroot}%{luarocks_treedir}/%{mod_name}/%{rock_version}/bin +touch %{buildroot}%{luarocks_treedir}/%{mod_name}/%{rock_version}/bin/rep.lua-%{lua_version} +ln -sf %{luarocks_treedir}/%{mod_name}/%{rock_version}/bin/rep.lua \ +%{buildroot}%{luarocks_treedir}/%{mod_name}/%{rock_version}/bin/rep.lua-%{lua_version} + +%post +%{_sbindir}/update-alternatives --install %{_bindir}/rep.lua rep.lua %{_bindir}/rep.lua-%{lua_version} %{lua_value} + +%postun +if [ "$1" = 0 ] ; then + %{_sbindir}/update-alternatives --remove rep.lua %{_bindir}/rep.lua-%{lua_version} +fi + +%if %{with test} +%check +make test +%endif + +%files +%license %{luarocks_treedir}/%{mod_name}/%{rock_version}/doc/COPYING +%docdir %{luarocks_treedir}/%{mod_name}/%{rock_version}/doc +%{lua_noarchdir} +%{luarocks_treedir}/%{mod_name} +%ghost %{_sysconfdir}/alternatives/rep.lua +%{_bindir}/rep.lua +%{_bindir}/rep.lua-%{lua_version} + +%changelog diff --git a/lua-repl-0.10.tar.xz b/lua-repl-0.10.tar.xz new file mode 120000 index 0000000..78163ed --- /dev/null +++ b/lua-repl-0.10.tar.xz @@ -0,0 +1 @@ +/ipfs/bafkreic2nakdid6xvvfzgebanorkwtwr2zumrstsd6igvryhy5yqjj3k2y \ No newline at end of file