diff --git a/attrib_test.patch b/attrib_test.patch index 4a4325c..2055bd1 100644 --- a/attrib_test.patch +++ b/attrib_test.patch @@ -1,5 +1,5 @@ ---- a/lua-@VERSION-tests/attrib.lua -+++ b/lua-@VERSION-tests/attrib.lua +--- a/lua-tests/attrib.lua ++++ b/lua-tests/attrib.lua @@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine local st, err, when = package.loadlib(DC"lib1", "*") if not st then diff --git a/files_test.patch b/files_test.patch index a0ed220..9d22629 100644 --- a/files_test.patch +++ b/files_test.patch @@ -1,7 +1,7 @@ -Index: lua-@VERSION/lua-@VERSION-tests/files.lua +Index: lua/lua-tests/files.lua =================================================================== ---- lua-@VERSION.orig/lua-@VERSION-tests/files.lua -+++ lua-@VERSION/lua-@VERSION-tests/files.lua +--- lua.orig/lua-tests/files.lua ++++ lua/lua-tests/files.lua @@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout) if not _port then -- invalid seek diff --git a/lua54.spec b/lua54.spec index 08fbdc7..4968cad 100644 --- a/lua54.spec +++ b/lua54.spec @@ -123,8 +123,9 @@ scripting, and rapid prototyping. Lua is implemented as a small library of C functions, written in ANSI C. %prep -sed -i -e "s-@VERSION-%{version}-g" %{PATCH1} %{PATCH2} %{PATCH3} -%autosetup -n lua-%{version} -p1 -a1 +%setup -q -n lua-%{version} -a1 +mv lua-%{version}-tests lua-tests +%autopatch -p1 # manpage cat doc/lua.1 | sed 's/TH LUA 1/TH LUA%{major_version} 1/' > doc/lua%{major_version}.1 @@ -186,7 +187,7 @@ touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc ln -sf %{_sysconfdir}/alternatives/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc %check -cd ./lua-%{version}-tests/ +cd ./lua-tests/ LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/lua%{major_version} all.lua %post -n %{libname} -p /sbin/ldconfig diff --git a/main_test.patch b/main_test.patch index af670cd..2880023 100644 --- a/main_test.patch +++ b/main_test.patch @@ -1,5 +1,5 @@ ---- a/lua-@VERSION-tests/main.lua -+++ b/lua-@VERSION-tests/main.lua +--- a/lua-tests/main.lua ++++ b/lua-tests/main.lua @@ -307,11 +307,11 @@ ]] RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)