forked from pool/lua54
Accepting request 865991 from devel:languages:lua
- Move tests to separate build OBS-URL: https://build.opensuse.org/request/show/865991 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lua54?expand=0&rev=7
This commit is contained in:
commit
84859954f6
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,5 +1,5 @@
|
|||||||
--- a/lua-tests/attrib.lua
|
--- a/attrib.lua
|
||||||
+++ b/lua-tests/attrib.lua
|
+++ b/attrib.lua
|
||||||
@@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine
|
@@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine
|
||||||
local st, err, when = package.loadlib(DC"lib1", "*")
|
local st, err, when = package.loadlib(DC"lib1", "*")
|
||||||
if not st then
|
if not st then
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: lua/lua-tests/files.lua
|
Index: lua/files.lua
|
||||||
===================================================================
|
===================================================================
|
||||||
--- lua.orig/lua-tests/files.lua
|
--- lua.orig/files.lua
|
||||||
+++ lua/lua-tests/files.lua
|
+++ lua/files.lua
|
||||||
@@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout)
|
@@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout)
|
||||||
|
|
||||||
if not _port then -- invalid seek
|
if not _port then -- invalid seek
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 22 12:38:04 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
- Move tests to separate build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Dec 5 12:48:18 UTC 2020 - Callum Farmer <gmbr3@opensuse.org>
|
Sat Dec 5 12:48:18 UTC 2020 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
35
lua54.spec
35
lua54.spec
@ -15,10 +15,16 @@
|
|||||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define name_ext -test
|
||||||
|
%define debug_package %{nil}
|
||||||
|
%else
|
||||||
|
%define name_ext %{nil}
|
||||||
|
%endif
|
||||||
%define major_version 5.4
|
%define major_version 5.4
|
||||||
%define libname liblua5_4-5
|
%define libname liblua5_4-5
|
||||||
Name: lua54
|
Name: lua54%{name_ext}
|
||||||
Version: 5.4.2
|
Version: 5.4.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Small Embeddable Language with Procedural Syntax
|
Summary: Small Embeddable Language with Procedural Syntax
|
||||||
@ -37,10 +43,14 @@ Patch2: files_test.patch
|
|||||||
Patch3: main_test.patch
|
Patch3: main_test.patch
|
||||||
# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2
|
# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2
|
||||||
#Patch4: upstream-bugs.patch
|
#Patch4: upstream-bugs.patch
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
BuildRequires: lua54
|
||||||
|
%else
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: lua-macros
|
BuildRequires: lua-macros
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
|
%endif
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Provides: lua = %{version}
|
Provides: lua = %{version}
|
||||||
@ -123,11 +133,18 @@ scripting, and rapid prototyping. Lua is implemented as a small library
|
|||||||
of C functions, written in ANSI C.
|
of C functions, written in ANSI C.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n lua-%{version} -a1
|
%if "%{flavor}" == "test"
|
||||||
mv lua-%{version}-tests lua-tests
|
%setup -T -q -b1 -n lua-%{version}-tests
|
||||||
%autopatch -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%else
|
||||||
|
%setup -q -n lua-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
# manpage
|
# manpage
|
||||||
|
%if "%{flavor}" != "test"
|
||||||
cat doc/lua.1 | sed 's/TH LUA 1/TH LUA%{major_version} 1/' > doc/lua%{major_version}.1
|
cat doc/lua.1 | sed 's/TH LUA 1/TH LUA%{major_version} 1/' > doc/lua%{major_version}.1
|
||||||
cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > doc/luac%{major_version}.1
|
cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > doc/luac%{major_version}.1
|
||||||
|
|
||||||
@ -185,11 +202,12 @@ touch %{buildroot}%{_sysconfdir}/alternatives/liblua.so
|
|||||||
ln -sf %{_sysconfdir}/alternatives/liblua.so %{buildroot}%{_libdir}/liblua.so
|
ln -sf %{_sysconfdir}/alternatives/liblua.so %{buildroot}%{_libdir}/liblua.so
|
||||||
touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc
|
touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc
|
||||||
ln -sf %{_sysconfdir}/alternatives/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
|
ln -sf %{_sysconfdir}/alternatives/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
|
||||||
|
%else
|
||||||
%check
|
%check
|
||||||
cd ./lua-tests/
|
LD_LIBRARY_PATH=%{_libdir} %{_bindir}/lua%{major_version} all.lua
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/lua%{major_version} all.lua
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" != "test"
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
%postun -n %{libname} -p /sbin/ldconfig
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -258,4 +276,5 @@ fi
|
|||||||
%files doc
|
%files doc
|
||||||
%doc doc/*
|
%doc doc/*
|
||||||
|
|
||||||
|
%endif
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- a/lua-tests/main.lua
|
--- a/main.lua
|
||||||
+++ b/lua-tests/main.lua
|
+++ b/main.lua
|
||||||
@@ -307,11 +307,11 @@
|
@@ -307,11 +307,11 @@
|
||||||
]]
|
]]
|
||||||
RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)
|
RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user