Accepting request 232302 from home:Mailaender:branches:devel:languages:lua

I expect this to fix many "Linux" games that were created and designed for Ubuntu and friends. They will then work outside the Steam runtime with native libraries on SUSE, too.

OBS-URL: https://build.opensuse.org/request/show/232302
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua51?expand=0&rev=5
This commit is contained in:
Marguerite Su 2014-05-02 09:10:50 +00:00 committed by Git OBS Bridge
parent d257093692
commit f1a8bee1f5
2 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 1 06:59:04 UTC 2014 - mailaender@opensuse.org
- Added a softlink to retain compatibility with .so naming from
the DEB world which is the quasi standard in gaming nowadays.
-------------------------------------------------------------------
Mon Apr 14 06:56:18 UTC 2014 - pgajdos@suse.com

View File

@ -113,21 +113,22 @@ simplicity, efficiency, portability, and low embedding cost.
%build
sed -i 's:LUA_ROOT2 "LIBDIR/lua/%{major_version}/":LUA_ROOT2 \"%{_lib}/lua/%{major_version}/":' src/luaconf.h
make %{?_smp_mflags} -C src CC="%{__cc}" MYCFLAGS="$RPM_OPT_FLAGS -fPIC -DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" V=%{major_version} all
make %{?_smp_mflags} -C src CC="%{__cc}" MYCFLAGS="%{optflags} -fPIC -DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" V=%{major_version} all
%install
make install INSTALL_TOP="$RPM_BUILD_ROOT%{_prefix}" INSTALL_LIB="$RPM_BUILD_ROOT%{_libdir}" INSTALL_CMOD=$RPM_BUILD_ROOT%{_libdir}/lua/%{major_version} INSTALL_MAN="$RPM_BUILD_ROOT%{_mandir}/man1"
install -D -m644 etc/lua.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/lua.pc
make install INSTALL_TOP="%{buildroot}%{_prefix}" INSTALL_LIB="%{buildroot}%{_libdir}" INSTALL_CMOD=%{buildroot}%{_libdir}/lua/%{major_version} INSTALL_MAN="%{buildroot}%{_mandir}/man1"
install -D -m644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
for file in lua luac ; do
mv "%{buildroot}%{_bindir}/${file}" "%{buildroot}%{_bindir}/${file}%{major_version}"
mv "%{buildroot}%{_mandir}/man1/${file}.1" "%{buildroot}%{_mandir}/man1/${file}%{major_version}.1"
done
install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version}
install -d -m 0755 %{buildroot}%{_libdir}/lua/%{major_version}
install -d -m 0755 %{buildroot}%{_datadir}/lua/%{major_version}
install -D %{SOURCE1} %buildroot/etc/rpm/macros.lua51
%clean
rm -rf $RPM_BUILD_ROOT
# Debian/Ubuntu/SteamOS/Arch Linux compatibility
ln -s %{_libdir}/liblua.so.%{major_version} %{buildroot}%{_libdir}/liblua%{major_version}.so.0
ln -s %{_libdir}/liblua.so %{buildroot}%{_libdir}/liblua5.1.so
%post
/usr/sbin/update-alternatives --install \
@ -161,6 +162,7 @@ fi
%files -n liblua5_1
%defattr(-,root,root)
%{_libdir}/liblua.so.%{major_version}
%{_libdir}/liblua%{major_version}.so.0
%files devel
%defattr(-,root,root)
@ -172,6 +174,7 @@ fi
%{_libdir}/pkgconfig/lua.pc
%{_libdir}/liblua.a
%{_libdir}/liblua.so
%{_libdir}/liblua5.1.so
%files doc
%defattr(-,root,root)