10
0
forked from pool/lua-linenoise

Accepting request 999683 from home:Pi-Cla

Submit new package.

OBS-URL: https://build.opensuse.org/request/show/999683
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-linenoise?expand=0&rev=1
This commit is contained in:
2022-08-31 17:35:43 +00:00
committed by Git OBS Bridge
commit d94db4b454
7 changed files with 150 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@@ -0,0 +1 @@
.osc

5
_multibuild Normal file
View File

@@ -0,0 +1,5 @@
<multibuild>
<package>lua51</package>
<package>lua53</package>
<package>lua54</package>
</multibuild>

17
_service Normal file
View File

@@ -0,0 +1,17 @@
<services>
<service mode="manual" name="obs_scm">
<param name="url">https://github.com/hoelzro/lua-linenoise</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="scm">git</param>
<param name="revision">03acd87f16c8a6777425f0040e99ba56e6858c91</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>

3
lua-linenoise-0.9.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9d64e4233757d266837d2443a0f4c8287d3bbf2ba3d5c860439492db38459df
size 5185296

4
lua-linenoise.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Mon Aug 22 22:56:29 UTC 2022 - Gordon Leung <pirateclip@protonmail.com>
- initial commit

97
lua-linenoise.spec Normal file
View File

@@ -0,0 +1,97 @@
#
# 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/
#
%define flavor @BUILD_FLAVOR@
%define mod_name linenoise
%define rock_version 0.9-1
%ifarch %{ix86}
%define luarock_arch x86
%else
%ifarch s390x
%define luarock_arch s390
%else
%define luarock_arch %{_arch}
%endif
%endif
%ifarch armv7hl %{ix86}
%bcond_with is64Bit
%else
%bcond_without is64Bit
%endif
Version: 0.9
Release: 0
Summary: Lua binding for the linenoise command line library
License: MIT
Group: Development/Languages/Other
URL: https://github.com/hoelzro/lua-linenoise
Source: lua-linenoise-%{version}.tar.xz
BuildRequires: %{flavor}-luarocks
BuildRequires: %{flavor}-devel
Requires: %{flavor}
%lua_provides
%if "%{flavor}" == ""
Name: lua-%{mod_name}
ExclusiveArch: do_not_build
%else
Name: %{flavor}-%{mod_name}
%endif
%description
Linenoise (https://github.com/antirez/linenoise) is a delightfully
simple command line library. This Lua module is simply a binding for it.
The main Linenoise upstream has stagnated a bit, so this binding tracks
https://github.com/yhirose/linenoise/tree/utf8-support, which includes
things like UTF-8 support and ANSI terminal escape sequence detection.
%prep
%autosetup -n lua-linenoise-%{version}
%build
%install
luarocks --lua-version "%{lua_version}" \
make --pack-binary-rock --deps-mode none "%{mod_name}-%{rock_version}.rockspec"
install -Dm 644 -t "lua-%{lua_version}/" "%{mod_name}-%{rock_version}.linux-%{luarock_arch}.rock"
luarocks --lua-version="%{lua_version}" --tree="%{buildroot}/usr/" \
install --deps-mode=none --no-manifest "lua-%{lua_version}/%{mod_name}-%{rock_version}.linux-%{luarock_arch}.rock"
# Seperate out documentation and licence
mv %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/doc/COPYING .
mkdir -p docs
mv %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/doc/* docs/
rmdir %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/doc
# Move pure lua modules to lua_noarchdir
mkdir -p %{buildroot}%{lua_noarchdir}/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}
mv %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/* \
%{buildroot}%{lua_noarchdir}/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}
# Move compiled modules to lua_archdir for 64bit archs, 32bit archs already in position
%if %{with is64Bit}
mkdir -p %{buildroot}%{lua_archdir}
mv %{buildroot}/usr/lib/lua/%{lua_version}/* %{buildroot}%{lua_archdir}
%endif
%files
%license COPYING
%doc docs/*
%{lua_archdir}
%{lua_noarchdir}
%changelog