[packages/lua54] - install default lua to / for rpm

baggins baggins at pld-linux.org
Sat Oct 24 13:04:58 CEST 2020


commit d7a673683a4ec29e8c51fb707f060e54dd637e2c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 24 13:04:35 2020 +0200

    - install default lua to / for rpm

 lua54.spec | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/lua54.spec b/lua54.spec
index ba51db9..26c01fb 100644
--- a/lua54.spec
+++ b/lua54.spec
@@ -133,7 +133,6 @@ sed -i  -e '/#define LUA_ROOT/s,/usr/local/,%{_prefix}/,' \
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_libdir}/lua}
 
 %{__make} install \
 	INSTALL_TOP=$RPM_BUILD_ROOT%{_prefix} \
@@ -154,8 +153,14 @@ done
 %{__mv} $RPM_BUILD_ROOT%{_libdir}/liblua{,5.4}.a
 
 # install shared library
+%if %{with default_lua}
+install -d $RPM_BUILD_ROOT/%{_lib}
+install src/liblua.so.5.4 $RPM_BUILD_ROOT/%{_lib}
+ln -sf /%{_lib}/liblua.so.5.4 $RPM_BUILD_ROOT%{_libdir}/liblua5.4.so
+%else
 install src/liblua.so.5.4 $RPM_BUILD_ROOT%{_libdir}
 ln -sf liblua.so.5.4 $RPM_BUILD_ROOT%{_libdir}/liblua5.4.so
+%endif
 
 %if %{with luastatic}
 install lua.static $RPM_BUILD_ROOT%{_bindir}/lua5.4.static
@@ -184,7 +189,7 @@ Libs: -L${libdir} -llua5.4 -ldl -lm
 EOF
 
 %if %{with default_lua}
-ln -sf liblua5.4.so $RPM_BUILD_ROOT%{_libdir}/liblua.so
+ln -sf /%{_lib}/liblua5.4.so $RPM_BUILD_ROOT%{_libdir}/liblua.so
 ln -sf liblua5.4.a $RPM_BUILD_ROOT%{_libdir}/liblua.a
 ln -sf lua5.4 $RPM_BUILD_ROOT%{_includedir}/lua
 ln -sf lua5.4.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/lua.pc
@@ -212,7 +217,11 @@ rm -rf $RPM_BUILD_ROOT
 %files libs
 %defattr(644,root,root,755)
 %doc README
+%if %{with default_lua}
+%attr(755,root,root) /%{_lib}/liblua.so.5.4
+%else
 %attr(755,root,root) %{_libdir}/liblua.so.5.4
+%endif
 %dir %{_libdir}/lua
 %{_libdir}/lua/5.4
 %dir %{_datadir}/lua
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lua54.git/commitdiff/d7a673683a4ec29e8c51fb707f060e54dd637e2c



More information about the pld-cvs-commit mailing list