2024-01-06 06:31:37 +01:00
|
|
|
%define libname liblua51
|
|
|
|
%define majver %(echo %version | cut -d. -f 1-2)
|
|
|
|
|
|
|
|
Name: lua51
|
|
|
|
Version: 5.1.5
|
2024-05-13 23:29:25 +02:00
|
|
|
Release: 5mamba
|
2024-01-06 06:31:37 +01:00
|
|
|
Summary: A powerful light-weight and embeddable programming language
|
|
|
|
Group: Applications/Development
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
2024-05-13 23:29:25 +02:00
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://lua.org/
|
|
|
|
Source: https://lua.org/ftp/lua-%{version}.tar.gz
|
|
|
|
Patch1: lua51-5.1.5-cve-2014-5461.patch
|
|
|
|
Patch2: lua51-5.1.5-coinstallability.patch
|
|
|
|
Patch3: lua51-5.1.5-cflags.patch
|
2024-01-06 06:31:37 +01:00
|
|
|
License: MIT
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libncurses-devel
|
|
|
|
BuildRequires: libreadline-devel
|
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
|
|
|
|
%description
|
|
|
|
Lua is a powerful light-weight programming language designed for extending applications.
|
|
|
|
Lua is also frequently used as a general-purpose, stand-alone language.
|
|
|
|
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics.
|
|
|
|
Lua is dynamically typed, interpreted from bytecodes, and has automatic memory management with garbage collection, making it ideal for configuration, scripting, and rapid prototyping.
|
|
|
|
A fundamental concept in the design of Lua is to provide meta-mechanisms for implementing features, instead of providing a host of features directly in the language.
|
|
|
|
For example, although Lua is not a pure object-oriented language, it does provide meta-mechanisms for implementing classes and inheritance.
|
|
|
|
Lua's meta-mechanisms bring an economy of concepts and keep the language small, while allowing the semantics to be extended in unconventional ways.
|
|
|
|
Extensible semantics is a distinguishing feature of Lua.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Group: Development/Libraries
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Lua is a powerful light-weight programming language designed for extending applications.
|
|
|
|
Lua is also frequently used as a general-purpose, stand-alone language.
|
|
|
|
This package contains files needed for embedding lua into your application.
|
|
|
|
|
|
|
|
%package -n %{libname}
|
|
|
|
Summary: Lua is a powerful, light-weight programming language
|
|
|
|
Group: System/Libraries
|
2024-05-13 23:29:25 +02:00
|
|
|
%ifarch x86_64 aarch64
|
|
|
|
Provides: liblua.so.5.1()(64bit)
|
|
|
|
%else
|
|
|
|
Provides: liblua.so.5.1
|
|
|
|
%endif
|
2024-01-06 06:31:37 +01:00
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
Lua is a powerful light-weight programming language designed for extending applications.
|
|
|
|
This package contains the dynamic libraries provided by lua scripting language.
|
|
|
|
|
|
|
|
%package -n %{libname}-devel
|
|
|
|
Summary: Static libraries and headers for lua
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
|
2024-05-13 23:29:25 +02:00
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
2024-01-06 06:31:37 +01:00
|
|
|
|
|
|
|
%description -n %{libname}-devel
|
|
|
|
Lua is a powerful light-weight programming language designed for extending applications.
|
|
|
|
This package contains static libraries and header files need for development.
|
|
|
|
|
|
|
|
%debug_package
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n lua-%{version}
|
2024-05-13 23:29:25 +02:00
|
|
|
# Taken from Arch Linux
|
|
|
|
%patch 1 -p1 -b .cve-2014-5461
|
|
|
|
%patch 2 -p1 -b .coinstallability
|
|
|
|
%patch 3 -p1 -b .cflags
|
|
|
|
|
|
|
|
sed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc
|
|
|
|
sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' -e '/^LUAC_T=/ s/luac/luac5.1/' -i src/Makefile
|
2024-01-06 06:31:37 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
##% make linux
|
2024-05-13 23:29:25 +02:00
|
|
|
%make -j1 \
|
2024-01-06 06:31:37 +01:00
|
|
|
CC=%{_host}-gcc \
|
2024-05-13 23:29:25 +02:00
|
|
|
MYCFLAGS="%{optflags} -fPIC -DLUA_USE_LINUX" \
|
|
|
|
MYLDFLAGS="-Wl,-E -ldl -lreadline -lhistory -lncurses" \
|
|
|
|
linux
|
2024-01-06 06:31:37 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
%makeinstall \
|
2024-05-13 23:29:25 +02:00
|
|
|
TO_BIN='lua5.1 luac5.1' \
|
|
|
|
TO_LIB="liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.%{version}" \
|
|
|
|
INSTALL_DATA='cp -d' \
|
2024-01-06 06:31:37 +01:00
|
|
|
INSTALL_TOP=%{buildroot}%{_prefix} \
|
|
|
|
INSTALL_INC=%{buildroot}%{_includedir}/lua%{majver} \
|
|
|
|
INSTALL_LIB=%{buildroot}%{_libdir} \
|
|
|
|
INSTALL_MAN=%{buildroot}%{_mandir}/man1
|
|
|
|
|
2024-05-13 23:29:25 +02:00
|
|
|
install -Dm644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua51.pc
|
|
|
|
ln -sf lua51.pc %{buildroot}%{_libdir}/pkgconfig/lua5.1.pc
|
|
|
|
ln -sf lua51.pc %{buildroot}%{_libdir}/pkgconfig/lua-5.1.pc
|
2024-01-06 06:31:37 +01:00
|
|
|
|
2024-05-13 23:29:25 +02:00
|
|
|
ln -s liblua5.1.so %{buildroot}%{_libdir}/liblua.so.5.1
|
|
|
|
ln -s liblua5.1.so %{buildroot}%{_libdir}/liblua.so.%{version}
|
2024-01-06 06:31:37 +01:00
|
|
|
|
2024-05-13 23:29:25 +02:00
|
|
|
cd %{buildroot}%{_mandir}/man1
|
|
|
|
mv %{buildroot}%{_mandir}/man1/{lua.1,lua5.1.1}
|
|
|
|
mv %{buildroot}%{_mandir}/man1/{luac.1,luac5.1.1}
|
2024-01-06 06:31:37 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2024-05-13 23:29:25 +02:00
|
|
|
%{_bindir}/lua5.1
|
|
|
|
%{_bindir}/luac5.1
|
|
|
|
%{_mandir}/man1/lua5.1.*
|
|
|
|
%{_mandir}/man1/luac5.1.*
|
2024-01-06 06:31:37 +01:00
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/liblua.so.*
|
|
|
|
%{_libdir}/liblua%{majver}.so.*
|
|
|
|
%doc COPYRIGHT
|
|
|
|
|
|
|
|
%files -n %{libname}-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_includedir}/lua%{majver}
|
|
|
|
%{_includedir}/lua%{majver}/*.h
|
|
|
|
%{_includedir}/lua%{majver}/*.hpp
|
|
|
|
%{_libdir}/liblua%{majver}.so
|
|
|
|
%{_libdir}/pkgconfig/lua%{majver}.pc
|
2024-05-13 23:29:25 +02:00
|
|
|
%{_libdir}/pkgconfig/lua-5.1.pc
|
|
|
|
%{_libdir}/pkgconfig/lua51.pc
|
2024-01-06 06:31:37 +01:00
|
|
|
%doc HISTORY README doc/*.html doc/*.css doc/*.gif doc/*.png
|
|
|
|
|
|
|
|
%changelog
|
2024-05-13 23:29:25 +02:00
|
|
|
* Mon May 13 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.5-5mamba
|
|
|
|
- liblua51: added legacy provides for soname liblua.so.5.1
|
|
|
|
|
|
|
|
* Sat May 11 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.5-4mamba
|
|
|
|
- rebuilt with coinstallability with more recent versions
|
|
|
|
|
2024-01-06 06:31:37 +01:00
|
|
|
* Sat Jul 20 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.5-3mamba
|
|
|
|
- provide liblua5.1.so* using symlinks
|
|
|
|
|
|
|
|
* Tue Apr 23 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.5-2mamba
|
|
|
|
- make devel package installable without conflicting with mainstream lua version
|
|
|
|
|
|
|
|
* Sat Dec 15 2012 Automatic Build System <autodist@mambasoft.it> 5.1.5-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Aug 15 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.4-3mamba
|
|
|
|
- rebuilt as legacy package
|
|
|
|
|
|
|
|
* Fri Dec 31 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.4-2mamba
|
|
|
|
- rebuilt with debug package
|
|
|
|
|
|
|
|
* Thu Dec 04 2008 gil <puntogil@libero.it> 5.1.4-1mamba
|
|
|
|
- update to 5.1.4
|
|
|
|
|
|
|
|
* Mon Jul 07 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.3-1mamba
|
|
|
|
- update to 5.1.3
|
|
|
|
- fix liblua.so: make it a symlink to liblua.so.*
|
|
|
|
|
|
|
|
* Fri Oct 26 2007 Aleph0 <aleph0@openmamba.org> 5.1.2-3mamba
|
|
|
|
- do not provide liblualib.so
|
|
|
|
|
|
|
|
* Thu Oct 25 2007 Aleph0 <aleph0@openmamba.org> 5.1.2-2mamba
|
|
|
|
- add lua.pc
|
|
|
|
|
|
|
|
* Wed Oct 24 2007 Aleph0 <aleph0@openmamba.org> 5.1.2-1mamba
|
|
|
|
- update to 5.1.2
|
|
|
|
- patched to build dynamic libraries
|
|
|
|
- package coding examples contained in the source code
|
|
|
|
- use standard CFLAGS options when building
|
|
|
|
|
|
|
|
* Thu Dec 14 2006 Aleph0 <aleph0@openmamba.org> 5.0.3-2qilnx
|
|
|
|
- created devel package
|
|
|
|
- build shared libraries
|
|
|
|
- added more documentation files
|
|
|
|
|
|
|
|
* Wed Oct 18 2006 Davide Madrisan <davide.madrisan@qilinux.it> 5.0.3-1qilnx
|
|
|
|
- update to version 5.0.3 by autospec
|
|
|
|
|
|
|
|
* Tue Apr 04 2006 Davide Madrisan <davide.madrisan@qilinux.it> 5.0.2-1qilnx
|
|
|
|
- package created by autospec
|