SHA256
10
0
forked from pool/lua53

8 Commits

Author SHA256 Message Date
6a7064402c interpreter should only provide, not conflict lua symbol (bsc#1247521) 2025-08-05 18:16:27 +02:00
6415b3491a interpreter should not conflict/provide lua symbol (bsc#1247521) 2025-08-04 13:52:52 +02:00
b8aaa33c80 this package also provides devel symlink directly and conflicts other -devel packages 2025-07-25 22:10:48 +02:00
a5fee331d4 don't require lua-interpreter when not using libalternatives 2025-07-25 13:29:22 +02:00
c3d42d0aa9 Set up support for using libalternatives for Tumbleweed
update-alternatives are still used for SLE.
Also, fix .gitignore and overall improve the packaging.
2025-07-23 23:04:14 +02:00
cb9e5d9061 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua53?expand=0&rev=39 2025-07-23 23:04:13 +02:00
96512089c2 Accepting request 1002891 from home:gmbr3:Lua
- Add shared_link.patch: fix dynamic linking executable
- Stop building static library

OBS-URL: https://build.opensuse.org/request/show/1002891
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua53?expand=0&rev=38
2025-07-23 23:04:13 +02:00
e69166c718 Accepting request 837721 from home:gmbr3:Active
- Update to version 5.3.6:
  * Fixes bugs found in Lua 5.3.5 and Lua 5.4.0
  * Lua 5.3 is now EOL
- Removed upstream-bugs.patch: new release (no bugs found yet)
- Removed upstream-bugs-backport-lua54.patch: new release (no bugs found yet)

OBS-URL: https://build.opensuse.org/request/show/837721
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua53?expand=0&rev=36
2025-07-23 23:04:13 +02:00
3 changed files with 68 additions and 37 deletions

4
.gitignore vendored
View File

@@ -1 +1,5 @@
.osc
_scmsync.obsinfo
_buildconfig-*
_buildinfo-*.xml
lua53-*-build/

View File

@@ -1,8 +1,16 @@
-------------------------------------------------------------------
Tue Aug 5 07:22:08 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- interpreter should only provide, not conflict lua symbol
(bsc#1247521)
-------------------------------------------------------------------
Mon Sep 12 11:10:48 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Add shared-link.patch: fix dynamic linking executable
- Stop building static library
- this package also provides devel symlink directly and conflicts
other -devel packages
-------------------------------------------------------------------
Fri Sep 25 14:46:59 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>

View File

@@ -18,14 +18,19 @@
%define major_version 5.3
%define libname liblua5_3-5
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: lua53
Version: 5.3.6
Release: 0
Summary: Small Embeddable Language with Procedural Syntax
License: MIT
Group: Development/Languages/Other
Url: http://www.lua.org
Source: http://www.lua.org/ftp/lua-%{version}.tar.gz
URL: https://www.lua.org
Source: https://www.lua.org/ftp/lua-%{version}.tar.gz
Source99: baselibs.conf
# PATCH-FIX-SUSE tweak the buildsystem to produce what is needed for SUSE
Patch0: lua-build-system.patch
@@ -38,11 +43,18 @@ BuildRequires: libtool
BuildRequires: lua-macros
BuildRequires: pkgconfig
BuildRequires: readline-devel
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: lua = %{version}
Obsoletes: lua < %{version}
Provides: Lua(API) = %{major_version}
%if %{with libalternatives}
BuildRequires: alts
BuildRequires: lua-interpreter
Requires: alts
Requires: lua-interpreter
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%description
Lua is a programming language originally designed for extending
@@ -62,8 +74,7 @@ Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: %{name} = %{version}
Requires: lua-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Conflicts: lua-devel
Provides: lua-devel = %{version}
Provides: Lua(devel) = %{major_version}
Provides: pkgconfig(lua) = %{version}
@@ -80,15 +91,15 @@ application.
Summary: The Lua integration library
# Compat as libtool changes the soname
Group: System/Libraries
Provides: liblua5_3 = %{version}-%{release}
Obsoletes: liblua5_3 < %{version}-%{release}
Provides: %{name}-libs = %{version}
Obsoletes: %{name}-libs < %{version}
%ifarch aarch64 x86_64 ppc64 ppc64le s390x riscv64
Provides: liblua.so.5.3()(64bit)
%else
Provides: liblua.so.5.3
%endif
Provides: liblua5_3 = %{version}-%{release}
Obsoletes: liblua5_3 < %{version}-%{release}
Provides: %{name}-libs = %{version}
Obsoletes: %{name}-libs < %{version}
%description -n %{libname}
Lua is a programming language originally designed for extending
@@ -131,7 +142,7 @@ cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > doc/luac%{major_
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
export LIBTOOL="libtool --quiet"
make %{?_smp_mflags} -C src \
%make_build -C src \
CC="cc" \
MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_USE_LINUX -DLUA_COMPAT_MODULE" \
MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" \
@@ -150,7 +161,7 @@ cat > lua%{major_version}.pc <<-EOF
prefix=%{_prefix}
exec_prefix=%{_prefix}
libdir=%{_libdir}
includedir=%{_prefix}/include/lua%{major_version}
includedir=%{_includedir}/lua%{major_version}
INSTALL_LMOD=%{_datadir}/lua/%{major_version}
INSTALL_CMOD=%{_libdir}/lua/%{major_version}
@@ -160,8 +171,21 @@ Version: %{version}
Libs: -llua%{major_version} -lm
Cflags: -I\${includedir}
EOF
install -D -m 644 lua%{major_version}.pc %{buildroot}/%{_libdir}/pkgconfig/lua%{major_version}.pc
install -D -m 644 lua%{major_version}.pc %{buildroot}%{_libdir}/pkgconfig/lua%{major_version}.pc
%if %{with libalternatives}
# alternatives - create configuration file
mkdir -p %{buildroot}%{_datadir}/libalternatives/lua
cat > %{buildroot}%{_datadir}/libalternatives/lua/53.conf <<EOF
binary=%{_bindir}/lua5.3
man=lua5.3
EOF
mkdir -p %{buildroot}%{_datadir}/libalternatives/luac
cat > %{buildroot}%{_datadir}/libalternatives/luac/53.conf <<EOF
binary=%{_bindir}/luac5.3
man=luac5.3
EOF
%else
# update-alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for file in lua luac ; do
@@ -170,16 +194,17 @@ for file in lua luac ; do
touch "%{buildroot}%{_sysconfdir}/alternatives/${file}.1%{ext_man}"
ln -sf "%{_sysconfdir}/alternatives/${file}.1%{ext_man}" "%{buildroot}%{_mandir}/man1/${file}.1%{ext_man}"
done
%endif
# Compat link with older unprefixed library and with soname 0 from deb/etc
chmod +x %{buildroot}%{_libdir}/*
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.%{major_version}
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.0
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua.so.%{major_version}
# Library devel alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/liblua.so
ln -sf %{_sysconfdir}/alternatives/liblua.so %{buildroot}%{_libdir}/liblua.so
touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc
ln -sf %{_sysconfdir}/alternatives/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
# We dont create alternatives for -devel content, just conflict those
ln -s %{_libdir}/liblua%{major_version}.so %{buildroot}%{_libdir}/liblua.so
ln -s %{_libdir}/pkgconfig/lua%{major_version}.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
%check
cd src
@@ -188,6 +213,7 @@ LD_LIBRARY_PATH=`pwd` ./lua%{major_version} -e 'print(0)' > /dev/null
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%if %{without libalternatives}
%post
%{_sbindir}/update-alternatives --install \
%{_bindir}/lua lua %{_bindir}/lua%{major_version} 53 \
@@ -199,16 +225,7 @@ LD_LIBRARY_PATH=`pwd` ./lua%{major_version} -e 'print(0)' > /dev/null
if [ "$1" = 0 ] ; then
%{_sbindir}/update-alternatives --remove lua %{_bindir}/lua%{major_version}
fi
%post devel
%{_sbindir}/update-alternatives --install \
%{_libdir}/liblua.so liblua.so %{_libdir}/liblua%{major_version}.so 53 \
--slave %{_libdir}/pkgconfig/lua.pc lua.pc %{_libdir}/pkgconfig/lua%{major_version}.pc
%postun devel
if [ "$1" = 0 ] ; then
%{_sbindir}/update-alternatives --remove liblua.so %{_libdir}/liblua%{major_version}.so
fi
%endif
%files
%doc README
@@ -218,17 +235,22 @@ fi
%dir %{_datadir}/lua/%{major_version}
%{_bindir}/lua%{major_version}
%{_bindir}/luac%{major_version}
%{_mandir}/man1/lua%{major_version}.1%{ext_man}
%{_mandir}/man1/luac%{major_version}.1%{ext_man}
%{_mandir}/man1/lua%{major_version}.1%{?ext_man}
%{_mandir}/man1/luac%{major_version}.1%{?ext_man}
%if %{with libalternatives}
%{_datadir}/libalternatives/lua/53.conf
%{_datadir}/libalternatives/luac/53.conf
%else
# alternatives
%{_bindir}/lua
%{_bindir}/luac
%{_mandir}/man1/lua.1%{ext_man}
%{_mandir}/man1/luac.1%{ext_man}
%{_mandir}/man1/lua.1%{?ext_man}
%{_mandir}/man1/luac.1%{?ext_man}
%ghost %{_sysconfdir}/alternatives/lua
%ghost %{_sysconfdir}/alternatives/luac
%ghost %{_sysconfdir}/alternatives/lua.1%{ext_man}
%ghost %{_sysconfdir}/alternatives/luac.1%{ext_man}
%endif
%files -n %{libname}
%{_libdir}/liblua%{major_version}.so.*
@@ -243,11 +265,8 @@ fi
%{_includedir}/lua%{major_version}/lualib.h
%{_libdir}/liblua%{major_version}.so
%{_libdir}/pkgconfig/lua%{major_version}.pc
# alternatives
%{_libdir}/liblua.so
%{_libdir}/pkgconfig/lua.pc
%ghost %{_sysconfdir}/alternatives/liblua.so
%ghost %{_sysconfdir}/alternatives/lua.pc
%files doc
%doc doc/*