SHA256
7
0
forked from pool/lua51

3 Commits

3 changed files with 43 additions and 11 deletions

3
.gitattributes vendored
View File

@@ -1,4 +1,4 @@
## Default LFS
*.changes merge=merge-changes
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
@@ -12,6 +12,7 @@
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Feb 19 16:42:08 UTC 2021 - Victor Zhestkov <victor.zhestkov@suse.com>
- Using right path for update-alternatives for Debian and Ubuntu
- Requirement alignments for Debian and Ubuntu
-------------------------------------------------------------------
Fri Feb 19 11:38:37 UTC 2021 - Victor Zhestkov <victor.zhestkov@suse.com>
- Add missing libncurses5 devel build requires for Ubuntu and Debian
-------------------------------------------------------------------
Fri Aug 2 08:12:52 UTC 2019 - Martin Liška <mliska@suse.cz>

View File

@@ -1,7 +1,7 @@
#
# spec file for package lua51
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,26 +18,41 @@
%define major_version 5.1
%define libname liblua5_1-5
%if "%{_vendor}" == "debbuild"
%define _upd_alt_dir %{_bindir}
%else
%define _upd_alt_dir %{_sbindir}
%endif
Name: lua51
Version: 5.1.5
Release: 0
Summary: Small Embeddable Language with Procedural Syntax
License: MIT
Group: Development/Languages/Other
Url: http://www.lua.org
URL: http://www.lua.org
Source: http://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
%if "%_vendor" == "debbuild"
BuildRequires: debbuild
%endif
BuildRequires: libtool
BuildRequires: lua-macros
BuildRequires: pkgconfig
BuildRequires: readline-devel
%if "%{_vendor}" == "debbuild"
BuildRequires: libncurses5-dev
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
Provides: lua = %{version}
Provides: Lua(API) = %{major_version}
%if "%_vendor" != "debbuild"
ExclusiveArch: do_not_build
%endif
%description
Lua is a programming language originally designed for extending
applications, but is also frequently used as a general-purpose,
@@ -53,11 +68,16 @@ of C functions, written in ANSI C.
%package devel
Summary: Development files for lua
Group: Development/Libraries/C and C++
%if "%{_vendor}" == "debbuild"
Requires: %{libname} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
%else
Requires: %{libname} = %{version}
Requires: %{name} = %{version}
%endif
Requires: lua-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
Provides: lua-devel = %{version}
Provides: Lua(devel) = %{major_version}
Provides: pkgconfig(lua) = %{version}
@@ -143,9 +163,9 @@ includedir=%{_prefix}/include/lua%{major_version}
INSTALL_LMOD=%{_datadir}/lua/%{major_version}
INSTALL_CMOD=%{_libdir}/lua/%{major_version}
Name: Lua %{major_version}
Name: Lua %{major_version}
Description: An Extensible Extension Language
Version: %{version}
Version: %{version}
Libs: -llua%{major_version} -lm
Cflags: -I\${includedir}
EOF
@@ -178,7 +198,7 @@ LD_LIBRARY_PATH=`pwd` ./lua%{major_version} -e 'print(0)' > /dev/null
%postun -n %{libname} -p /sbin/ldconfig
%post
%{_sbindir}/update-alternatives --install \
%{_upd_alt_dir}/update-alternatives --install \
%{_bindir}/lua lua %{_bindir}/lua%{major_version} 51 \
--slave %{_bindir}/luac luac %{_bindir}/luac%{major_version} \
--slave %{_mandir}/man1/lua.1%{ext_man} lua.1%{ext_man} %{_mandir}/man1/lua%{major_version}.1%{ext_man} \
@@ -186,17 +206,17 @@ LD_LIBRARY_PATH=`pwd` ./lua%{major_version} -e 'print(0)' > /dev/null
%postun
if [ "$1" = 0 ] ; then
%{_sbindir}/update-alternatives --remove lua %{_bindir}/lua%{major_version}
%{_upd_alt_dir}/update-alternatives --remove lua %{_bindir}/lua%{major_version}
fi
%post devel
%{_sbindir}/update-alternatives --install \
%{_upd_alt_dir}/update-alternatives --install \
%{_libdir}/liblua.so liblua.so %{_libdir}/liblua%{major_version}.so 51 \
--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
%{_upd_alt_dir}/update-alternatives --remove liblua.so %{_libdir}/liblua%{major_version}.so
fi
%files