forked from pool/lua-luarepl
Fix rpmlint "file-contains-buildroot" error
This was failing with osc build --noservice --clean --vm-type=kvm -M=lua51 standard lua51-luarepl.noarch: I: package-supports-update-alternatives lua51-luarepl.src: E: invalid-spec-name The spec file name (without the .spec suffix) must match the package name ('Name:' tag). lua51-luarepl.noarch: E: file-contains-buildroot (Badness: 10000) /usr/bin/rep.lua-5.1 Your file contains traces of %{buildroot}. OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-luarepl?expand=0&rev=5
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
5
_multibuild
Normal file
5
_multibuild
Normal file
@@ -0,0 +1,5 @@
|
||||
<multibuild>
|
||||
<package>lua51</package>
|
||||
<package>lua53</package>
|
||||
<package>lua54</package>
|
||||
</multibuild>
|
17
_service
Normal file
17
_service
Normal file
@@ -0,0 +1,17 @@
|
||||
<services>
|
||||
<service mode="manual" name="obs_scm">
|
||||
<param name="url">https://github.com/hoelzro/lua-repl</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">d67da674dac07597eb914d471237414b1c662a65</param>
|
||||
<param name="versionrewrite-pattern">(\d+.\d+)</param>
|
||||
<param name="versionrewrite-replacement">\1</param>
|
||||
</service>
|
||||
<service mode="manual" name="tar" />
|
||||
<service mode="manual" name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service mode="manual" name="set_version"/>
|
||||
</services>
|
||||
|
14
lua-luarepl.changes
Normal file
14
lua-luarepl.changes
Normal file
@@ -0,0 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 27 12:17:35 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Fix rpmlint "file-contains-buildroot" error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 11:52:07 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
||||
|
||||
- Fix missing dependency on lua-macros (boo#1205612)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 25 04:26:47 UTC 2022 - Gordon Leung <pirateclip@protonmail.com>
|
||||
|
||||
- initial commit
|
109
lua-luarepl.spec
Normal file
109
lua-luarepl.spec
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# 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: lua-macros
|
||||
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}##g" -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
|
3
lua-repl-0.10.tar.xz
Normal file
3
lua-repl-0.10.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5a6814340fd7ad4b9310206ba2ab4ed1d668c8ca721f906ac707c77104a76ad6
|
||||
size 20624
|
Reference in New Issue
Block a user