commit d94db4b45421684a2c8cfcb478057d649298159b1590e17ac41fbd2dd80df5f6 Author: Matej Cepl Date: Wed Aug 31 17:35:43 2022 +0000 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 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..72d2b45 --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + +lua51 +lua53 +lua54 + diff --git a/_service b/_service new file mode 100644 index 0000000..c8d32e3 --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + https://github.com/hoelzro/lua-linenoise + @PARENT_TAG@ + git + 03acd87f16c8a6777425f0040e99ba56e6858c91 + (\d+.\d+) + \1 + + + + *.tar + xz + + + + diff --git a/lua-linenoise-0.9.tar.xz b/lua-linenoise-0.9.tar.xz new file mode 100644 index 0000000..d69dc45 --- /dev/null +++ b/lua-linenoise-0.9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9d64e4233757d266837d2443a0f4c8287d3bbf2ba3d5c860439492db38459df +size 5185296 diff --git a/lua-linenoise.changes b/lua-linenoise.changes new file mode 100644 index 0000000..882c639 --- /dev/null +++ b/lua-linenoise.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Aug 22 22:56:29 UTC 2022 - Gordon Leung + +- initial commit diff --git a/lua-linenoise.spec b/lua-linenoise.spec new file mode 100644 index 0000000..4172d5c --- /dev/null +++ b/lua-linenoise.spec @@ -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