From 65d3bd8e98e5657e715fbdbc75684600a758e6a73ff3da92b1d0eb8c7160c419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 14 Jul 2017 12:27:18 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-toluapp?expand=0&rev=6 --- lua-toluapp.spec | 13 ++++++++++++- tolua++-1.0.93-lua52.patch | 13 ------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lua-toluapp.spec b/lua-toluapp.spec index 3a6b277..dd03526 100644 --- a/lua-toluapp.spec +++ b/lua-toluapp.spec @@ -18,6 +18,17 @@ %define flavor @BUILD_FLAVOR@ %define mod_name toluapp +%define lua_suffix %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2 |sed -e 's:\.:_:') +%define lua_value %(echo "%{flavor}" |sed -e 's:lua::') +%if "%{flavor}" == "lua51" +%define lua_suffix 5_1 +%endif +%if "%{flavor}" == "lua52" +%define lua_suffix 5_2 +%endif +%if "%{flavor}" == "lua53" +%define lua_suffix 5_3 +%endif Name: %{flavor}-%{mod_name} Version: 1.0.93 Release: 0 @@ -137,7 +148,7 @@ ln -sf %{_sysconfdir}/alternatives/tolua++ %{buildroot}%{_bindir}/tolua++ %postun -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig %post -n toluapp-%{lua_version} /sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/tolua++ tolua++ %{_bindir}/toluapp-%{lua_version} 10 +%{_sbindir}/update-alternatives --install %{_bindir}/tolua++ tolua++ %{_bindir}/toluapp-%{lua_version} %{lua_value} %postun -n toluapp-%{lua_version} /sbin/ldconfig diff --git a/tolua++-1.0.93-lua52.patch b/tolua++-1.0.93-lua52.patch index 45736d7..0f6dc9e 100644 --- a/tolua++-1.0.93-lua52.patch +++ b/tolua++-1.0.93-lua52.patch @@ -17,19 +17,6 @@ diff -urN tolua++-1.0.93/config_linux.py tolua++-1.0.93.lua52/config_linux.py -LIBS = ['lua50', 'lualib50', 'dl', 'm'] +LIBS = ['lua', 'dl', 'm'] -diff -urN tolua++-1.0.93/custom.py tolua++-1.0.93.lua52/custom.py ---- tolua++-1.0.93/custom.py 1970-01-01 01:00:00.000000000 +0100 -+++ tolua++-1.0.93.lua52/custom.py 2014-10-01 11:52:32.217957188 +0200 -@@ -0,0 +1,9 @@ -+CCFLAGS = ['-O2', '-ansi'] -+#LIBPATH = ['/usr/local/lib'] -+LIBS = ['lua', 'dl', 'm'] -+prefix = '/usr' -+build_dev=1 -+tolua_bin = 'tolua++' -+tolua_lib = 'tolua++-5.2' -+TOLUAPP = 'tolua++' -+ diff -urN tolua++-1.0.93/SConstruct tolua++-1.0.93.lua52/SConstruct --- tolua++-1.0.93/SConstruct 2008-04-21 02:05:35.000000000 +0200 +++ tolua++-1.0.93.lua52/SConstruct 2014-10-01 13:51:40.837513339 +0200