[packages/lua-filesystem] - rel 3, build also for lua 5.2

baggins baggins at pld-linux.org
Thu Dec 26 11:11:44 CET 2024


commit 805a8c63bc5c65814bd1cfa7740e2906ad19f01b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Dec 26 11:06:39 2024 +0100

    - rel 3, build also for lua 5.2

 lua-filesystem.spec | 60 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 51 insertions(+), 9 deletions(-)
---
diff --git a/lua-filesystem.spec b/lua-filesystem.spec
index 7eabf22..16d48be 100644
--- a/lua-filesystem.spec
+++ b/lua-filesystem.spec
@@ -1,4 +1,5 @@
 %bcond_without	lua51		# lua51 package
+%bcond_without	lua52		# lua52 package
 %bcond_without	lua53		# lua53 package
 
 %define		real_name	luafilesystem
@@ -8,7 +9,7 @@ Summary:	File System Library for Lua
 Summary(hu.UTF-8):	Fájlrendszer-könyvtár Lua-hoz.
 Name:		lua54-filesystem
 Version:	1.8.0
-Release:	2
+Release:	3
 License:	BSD-like
 Group:		Development/Languages
 Source0:	https://github.com/keplerproject/luafilesystem/archive/v%{tag_ver}/%{real_name}-%{version}.tar.gz
@@ -16,12 +17,9 @@ Source0:	https://github.com/keplerproject/luafilesystem/archive/v%{tag_ver}/%{re
 URL:		https://keplerproject.github.io/luafilesystem/
 BuildRequires:	lua54-devel
 BuildRequires:	rpmbuild(macros) >= 1.605
-%if %{with lua51}
-BuildRequires:	lua51-devel
-%endif
-%if %{with lua53}
-BuildRequires:	lua53-devel
-%endif
+%{?with_lua51:BuildRequires:	lua51-devel}
+%{?with_lua52:BuildRequires:	lua52-devel}
+%{?with_lua53:BuildRequires:	lua53-devel}
 Requires:	lua54-libs
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -47,12 +45,31 @@ distribution.
 
 Package for Lua 5.1.
 
-%description -l hu.UTF-8
+%description -n lua51-filesystem -l hu.UTF-8
 LuaFileSystem egy Lua könyvtár, amely függvények halmazát nyújtja,
 hogy a fájlrendszeren műveleteket végezhess.
 
 Package for Lua 5.1.
 
+%package -n lua52-filesystem
+Summary:	File System Library for Lua
+Summary(hu.UTF-8):	Fájlrendszer-könyvtár Lua-hoz.
+Requires:	lua52-libs
+Obsoletes:	lua-filesystem < 1.7.0.2
+
+%description -n lua52-filesystem
+LuaFileSystem is a Lua library developed to complement the set of
+functions related to file systems offered by the standard Lua
+distribution.
+
+Package for Lua 5.2.
+
+%description -n lua52-filesystem -l hu.UTF-8
+LuaFileSystem egy Lua könyvtár, amely függvények halmazát nyújtja,
+hogy a fájlrendszeren műveleteket végezhess.
+
+Package for Lua 5.2.
+
 %package -n lua53-filesystem
 Summary:	File System Library for Lua
 Summary(hu.UTF-8):	Fájlrendszer-könyvtár Lua-hoz.
@@ -65,7 +82,7 @@ distribution.
 
 Package for Lua 5.3.
 
-%description -l hu.UTF-8
+%description -n lua53-filesystem -l hu.UTF-8
 LuaFileSystem egy Lua könyvtár, amely függvények halmazát nyújtja,
 hogy a fájlrendszeren műveleteket végezhess.
 
@@ -76,6 +93,7 @@ Package for Lua 5.3.
 
 %{__mkdir} build-5.4
 %{?with_lua51:%{__mkdir} build-5.1}
+%{?with_lua51:%{__mkdir} build-5.2}
 %{?with_lua53:%{__mkdir} build-5.3}
 
 %build
@@ -101,6 +119,18 @@ Package for Lua 5.3.
 %{__mv} src/lfs.so build-5.1
 %endif
 
+%if %{with lua52}
+%{__make} clean
+%{__make} \
+	CC="%{__cc}" \
+	WARN="%{rpmcflags} %{rpmcppflags} -fPIC" \
+	LUA_VERSION=5.2 \
+	PREFIX=%{_prefix} \
+	LUA_LIBDIR=%{_libdir}/lua/5.2
+
+%{__mv} src/lfs.so build-5.2
+%endif
+
 %if %{with lua53}
 %{__make} clean
 %{__make} \
@@ -124,6 +154,11 @@ install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.1
 install -p build-5.1/lfs.so $RPM_BUILD_ROOT%{_libdir}/lua/5.1/lfs.so
 %endif
 
+%if %{with lua52}
+install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.2
+install -p build-5.2/lfs.so $RPM_BUILD_ROOT%{_libdir}/lua/5.2/lfs.so
+%endif
+
 %if %{with lua53}
 install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.3
 install -p build-5.3/lfs.so $RPM_BUILD_ROOT%{_libdir}/lua/5.3/lfs.so
@@ -144,6 +179,13 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/lua/5.1/lfs.so
 %endif
 
+%if %{with lua52}
+%files -n lua52-filesystem
+%defattr(644,root,root,755)
+%doc README.md doc/us/*
+%attr(755,root,root) %{_libdir}/lua/5.2/lfs.so
+%endif
+
 %if %{with lua53}
 %files -n lua53-filesystem
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lua-filesystem.git/commitdiff/805a8c63bc5c65814bd1cfa7740e2906ad19f01b



More information about the pld-cvs-commit mailing list