diff --git a/lua-5.4.0-beta-autotoolize.patch b/lua-5.4.0-beta-autotoolize.patch index 2ff70f8a0a3944d96ba1d77612597c46031fa694..9a8f1335ce1a519f3c466b32c85d682850c5640f 100644 --- a/lua-5.4.0-beta-autotoolize.patch +++ b/lua-5.4.0-beta-autotoolize.patch @@ -143,7 +143,7 @@ diff -up lua-5.4.0-beta/src/lua.pc.in.autoxxx lua-5.4.0-beta/src/lua.pc.in diff -up lua-5.4.0-beta/src/Makefile.am.autoxxx lua-5.4.0-beta/src/Makefile.am --- lua-5.4.0-beta/src/Makefile.am.autoxxx 2019-10-23 15:03:13.297916423 -0400 +++ lua-5.4.0-beta/src/Makefile.am 2019-10-23 15:03:13.297916423 -0400 -@@ -0,0 +1,46 @@ +@@ -0,0 +1,47 @@ +AM_CFLAGS = -Wall + +include_HEADERS = lua.h lualib.h lauxlib.h lua.hpp @@ -152,6 +152,7 @@ diff -up lua-5.4.0-beta/src/Makefile.am.autoxxx lua-5.4.0-beta/src/Makefile.am + +lib_LTLIBRARIES = liblua.la +liblua_la_LDFLAGS = -release @MAJOR_VERSION@ ++liblua_la_LIBADD = @LUA_LIBS@ +liblua_la_SOURCES = \ + lapi.c lauxlib.c lbaselib.c lcode.c lcorolib.c lctype.c ldblib.c \ + ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c lmathlib.c lmem.c \ @@ -167,7 +168,7 @@ diff -up lua-5.4.0-beta/src/Makefile.am.autoxxx lua-5.4.0-beta/src/Makefile.am +bin_PROGRAMS = lua luac + +lua_SOURCES = lua.c -+lua_LDADD = liblua.la @LUA_LIBS@ @READLINE_LIBS@ ++lua_LDADD = liblua.la @READLINE_LIBS@ +lua_DEPENDENCIES = liblua.la + +luac_SOURCES = luac.c diff --git a/lua-5.4.6-tests.tar.gz b/lua-5.4.6-tests.tar.gz deleted file mode 100644 index 8ab62648408326cd91b0d37b74484f3dfd1923fd..0000000000000000000000000000000000000000 Binary files a/lua-5.4.6-tests.tar.gz and /dev/null differ diff --git a/lua-5.4.6.tar.gz b/lua-5.4.6.tar.gz deleted file mode 100644 index 5677b16bc0a4df093b6b57d51538108df2329ff7..0000000000000000000000000000000000000000 Binary files a/lua-5.4.6.tar.gz and /dev/null differ diff --git a/lua-5.4.7-tests.tar.gz b/lua-5.4.7-tests.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..55ec8c711f9c1f3a80dd2c79c2c0d4ec1fc65dad Binary files /dev/null and b/lua-5.4.7-tests.tar.gz differ diff --git a/lua-5.4.7.tar.gz b/lua-5.4.7.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..514367bc381def5a8962b07febaffdd40f700706 Binary files /dev/null and b/lua-5.4.7.tar.gz differ diff --git a/lua.attr b/lua.attr new file mode 100644 index 0000000000000000000000000000000000000000..a4332662169a80176eec9c2532c2ed097c36f9bb --- /dev/null +++ b/lua.attr @@ -0,0 +1,19 @@ +%__lua_requires() %{lua: + -- Match buildroot paths of the form + -- /PATH/OF/BUILDROOT/usr/lib(64)/lua/MAJOR.MINOR/ and + -- /PATH/OF/BUILDROOT/usr/share/pythonMAJOR.MINOR/ + -- generating a line of the form: + -- lua(abi) = MAJOR.MINOR + local path = rpm.expand('%1') + local datadir = rpm.expand('%_datadir') + local libdir = rpm.expand('%_libdir') + for i, dir in ipairs({datadir, libdir}) do + if path:match(dir .. '/lua/%d+%.%d+/.*') then + local requires = path:gsub('.*' .. dir .. '/lua/(%d+%.%d+)/.*', 'lua(abi) = %1') + print(requires) + break + end + end +} + +%__lua_path ^(%{_datadir}|%{_libdir})/lua/[[:digit:]]+\\.[[:digit:]]+/.+ diff --git a/lua.spec b/lua.spec index 7d5fffca8ffa3a78f44971627e7ac4779c4ee4fe..2fb0bad935d71ac8a04c6d922da3aacb636b5afa 100644 --- a/lua.spec +++ b/lua.spec @@ -1,17 +1,13 @@ %global major_version 5.4 -# test version is 5.4.6 -%global test_version 5.4.6 -# Place rpm-macros into proper location. -%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: lua -Version: 5.4.6 +Version: 5.4.7 Release: 1 Summary: A powerful, efficient, lightweight, embeddable scripting language License: MIT -URL: http://www.lua.org/ -Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz -Source1: http://www.lua.org/tests/lua-%{test_version}-tests.tar.gz +URL: https://www.lua.org/ +Source0: https://www.lua.org/ftp/lua-%{version}.tar.gz +Source1: https://www.lua.org/tests/lua-%{version}-tests.tar.gz # Source2, Source100,Patch0~3 from https://koji.fedoraproject.org/koji/buildinfo?buildID=1113624 # multilib Source2: luaconf.h @@ -19,6 +15,7 @@ Source2: luaconf.h Source3: mit.txt # rpm-macro Source1000: macros.lua +Source1001: lua.attr Patch0: lua-5.4.0-beta-autotoolize.patch Patch1: lua-5.4.6-idsize.patch Patch2: lua-5.2.2-configure-linux.patch @@ -38,9 +35,11 @@ functional programming, data-driven programming, and data description. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: pkgconfig Obsoletes: %{name}-static < %{version}-%{release} Provides: %{name}-static = %{version}-%{release} +Provides: lua-rpm-macros = %{version}-%{release} +Provides: lua-srpm-macros = %{version}-%{release} +Conflicts: lua < 5.4.7 %description devel This package contains development files for %{name}. @@ -48,13 +47,10 @@ This package contains development files for %{name}. %package_help %prep -%setup -q -a 1 -cp %{SOURCE3} . +%setup -qn %{name}-%{version} -a 1 +cp %{S:3} . mv src/luaconf.h src/luaconf.h.template.in -%patch0 -p1 -E -z .autoxxx -%patch1 -p1 -z .idsize -%patch2 -p1 -z .configure-linux -%patch3 -p1 -z .configure-compat-all +%autopatch -p1 # Put proper version in configure.ac, patch0 hardcodes 5.3.0 sed -i 's|5.3.0|%{version}|g' configure.ac @@ -66,27 +62,27 @@ autoreconf -ifv # Autotools give me a headache sometimes. sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template -# hack so that only /usr/bin/lua gets linked with readline as it is the -# only one which needs this and otherwise we get License troubles -%make_build LIBS="-lm -ldl" -# only /usr/bin/lua links with readline now #luac_LDADD="liblua.la -lm -ldl" +%make_build %install %make_install -rm $RPM_BUILD_ROOT%{_libdir}/*.la +%delete_la mkdir -p %{buildroot}/%{_libdir}/lua/%{major_version} mkdir -p %{buildroot}/%{_datadir}/lua/%{major_version} # Rename luaconf.h to luaconf-.h to avoid file conflicts on # multilib systems and install luaconf.h wrapper mv %{buildroot}%{_includedir}/luaconf.h %{buildroot}%{_includedir}/luaconf-%{_arch}.h -install -p -m 644 %{SOURCE2} %{buildroot}%{_includedir}/luaconf.h +install -p -m 644 %{S:2} %{buildroot}%{_includedir}/luaconf.h # Install rpm-macro -install -Dpm 0644 %{SOURCE1000} $RPM_BUILD_ROOT/%{macrosdir}/macros.lua +mkdir -p %{buildroot}%{rpmmacrodir} +install -pm 644 %{S:1000} %{buildroot}%{rpmmacrodir}/macros.lua +mkdir -p %{buildroot}/%{_fileattrsdir} +install -Dpm 0644 %{S:1001} %{buildroot}/%{_fileattrsdir}/lua.attr %check -cd ./lua-%{test_version}-tests/ +cd ./lua-%{version}-tests/ # Removing tests that fail under mock/koji sed -i.orig -e ' @@ -95,16 +91,7 @@ sed -i.orig -e ' ' all.lua LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua -e"_U=true" all.lua -%pre - -%preun - -%post - -%postun - %files -%defattr(-,root,root) %license mit.txt %{_bindir}/lua %{_bindir}/luac @@ -113,22 +100,24 @@ LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua -e"_U= %dir %{_datadir}/lua %dir %{_datadir}/lua/%{major_version} %{_libdir}/liblua-%{major_version}.so -%{_libdir}/liblua.so %files devel -%defattr(-,root,root) %{_includedir}/l*.h %{_includedir}/l*.hpp %{_libdir}/pkgconfig/*.pc +%{_libdir}/liblua.so %{_libdir}/*.a -%{macrosdir}/macros.lua +%{rpmmacrodir}/macros.lua +%{_fileattrsdir}/lua.attr %files help -%defattr(-,root,root) %doc README doc/*.html doc/*.css doc/*.gif doc/*.png %{_mandir}/man1/lua*.1* %changelog +* Sat Sep 28 2024 Funda Wang - 5.4.7-1 +- update to version 5.4.7 + * Wed Jun 14 2023 yanglongkang - 5.4.6-1 - upgrade to version 5.4.6 diff --git a/lua.yaml b/lua.yaml index 1d141cc30e48d3cf07fe9d023b344320f9f14d22..e5f8e5c9ac3e7e99cf1e31fce59728db0423edcd 100644 --- a/lua.yaml +++ b/lua.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: lua/lua tag_prefix: ^v -seperator: . +separator: .