2017-07-07 13:14:29 +00:00
|
|
|
#
|
|
|
|
# spec file for package lua
|
|
|
|
#
|
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define major_version 5.3
|
2017-07-07 13:41:38 +00:00
|
|
|
%define libname liblua5_3
|
2017-07-07 13:14:29 +00:00
|
|
|
Name: lua
|
2017-07-07 13:16:30 +00:00
|
|
|
Version: 5.3.4
|
2017-07-07 13:14:29 +00:00
|
|
|
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
|
|
|
|
Source1: macros.lua
|
|
|
|
Source2: baselibs.conf
|
2017-07-07 13:41:38 +00:00
|
|
|
# PATCH-FIX-SUSE tweak the buildsystem to produce what is needed for SUSE
|
|
|
|
Patch0: lua-build-system.patch
|
2017-07-07 13:14:29 +00:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
Provides: Lua(API) = %{major_version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
Lua is a programming language originally designed for extending
|
|
|
|
applications, but is also frequently used as a general-purpose,
|
|
|
|
stand-alone language.
|
|
|
|
|
|
|
|
Lua combines procedural syntax (similar to Pascal) with
|
|
|
|
data description constructs based on associative arrays and extensible
|
|
|
|
semantics. Lua is dynamically typed, interpreted from byte codes, and
|
|
|
|
has automatic memory management, making it suitable for configuration,
|
|
|
|
scripting, and rapid prototyping. Lua is implemented as a small library
|
|
|
|
of C functions, written in ANSI C.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for lua
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
2017-07-07 13:41:38 +00:00
|
|
|
Requires: %libname = %{version}
|
2017-07-07 13:14:29 +00:00
|
|
|
Provides: Lua(devel) = %{major_version}
|
|
|
|
Conflicts: otherproviders(Lua(devel))
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Lua is a programming language originally designed for extending
|
|
|
|
applications, but is also frequently used as a general-purpose,
|
|
|
|
stand-alone language.
|
|
|
|
|
|
|
|
This package contains files needed for embedding lua into your
|
|
|
|
application.
|
|
|
|
|
2017-07-07 13:41:38 +00:00
|
|
|
%package -n %libname
|
2017-07-07 13:14:29 +00:00
|
|
|
Summary: The Lua integration library
|
|
|
|
Group: System/Libraries
|
|
|
|
Provides: %{name}-libs = %{version}
|
|
|
|
Obsoletes: %{name}-libs < %{version}
|
|
|
|
|
2017-07-07 13:41:38 +00:00
|
|
|
%description -n %libname
|
2017-07-07 13:14:29 +00:00
|
|
|
Lua is a programming language originally designed for extending
|
|
|
|
applications, but is also frequently used as a general-purpose,
|
|
|
|
stand-alone language.
|
|
|
|
|
|
|
|
Lua combines procedural syntax (similar to Pascal) with
|
|
|
|
data description constructs based on associative arrays and extensible
|
|
|
|
semantics. Lua is dynamically typed, interpreted from byte codes, and
|
|
|
|
has automatic memory management, making it suitable for configuration,
|
|
|
|
scripting, and rapid prototyping. Lua is implemented as a small library
|
|
|
|
of C functions, written in ANSI C.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for Lua, a small embeddable language
|
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Lua is a programming language originally designed for extending
|
|
|
|
applications, but is also frequently used as a general-purpose,
|
|
|
|
stand-alone language.
|
|
|
|
|
|
|
|
Lua combines procedural syntax (similar to Pascal) with
|
|
|
|
data description constructs based on associative arrays and extensible
|
|
|
|
semantics. Lua is dynamically typed, interpreted from byte codes, and
|
|
|
|
has automatic memory management, making it suitable for configuration,
|
|
|
|
scripting, and rapid prototyping. Lua is implemented as a small library
|
|
|
|
of C functions, written in ANSI C.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2017-07-07 13:41:38 +00:00
|
|
|
%autopatch -p1
|
2017-07-07 13:14:29 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
|
2017-07-07 13:41:38 +00:00
|
|
|
make %{?_smp_mflags} -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" \
|
|
|
|
V=%{major_version}
|
|
|
|
all
|
2017-07-07 13:14:29 +00:00
|
|
|
|
|
|
|
%install
|
2017-07-07 13:41:38 +00:00
|
|
|
make install \
|
|
|
|
INSTALL_TOP="%{buildroot}%{_prefix}" \
|
|
|
|
INSTALL_LIB="%{buildroot}%{_libdir}" \
|
|
|
|
INSTALL_CMOD=%{buildroot}%{_libdir}/lua/%{major_version} \
|
|
|
|
INSTALL_MAN="%{buildroot}%{_mandir}/man1"
|
2017-07-07 13:14:29 +00:00
|
|
|
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.lua
|
|
|
|
|
|
|
|
# create pkg-config file
|
|
|
|
cat > lua.pc <<-EOF
|
|
|
|
prefix=%{_prefix}
|
|
|
|
exec_prefix=%{_prefix}
|
|
|
|
libdir=%{_libdir}
|
|
|
|
includedir=%{_prefix}}/include
|
|
|
|
|
|
|
|
Name: Lua
|
|
|
|
Description: An Extensible Extension Language
|
|
|
|
Version: %{version}
|
|
|
|
Libs: -llua -lm
|
|
|
|
Cflags:
|
|
|
|
EOF
|
|
|
|
install -D -m 644 lua.pc %{buildroot}/%{_libdir}/pkgconfig/lua.pc
|
|
|
|
|
|
|
|
%check
|
|
|
|
cd src
|
|
|
|
LD_LIBRARY_PATH=`pwd` ./lua -e 'print(0)' > /dev/null
|
|
|
|
|
2017-07-07 13:41:38 +00:00
|
|
|
%post -n %libname -p /sbin/ldconfig
|
2017-07-07 13:14:29 +00:00
|
|
|
|
2017-07-07 13:41:38 +00:00
|
|
|
%postun -n %libname -p /sbin/ldconfig
|
2017-07-07 13:14:29 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README
|
|
|
|
%dir %{_libdir}/lua
|
|
|
|
%dir %{_libdir}/lua/%{major_version}
|
|
|
|
%dir %{_datadir}/lua
|
|
|
|
%dir %{_datadir}/lua/%{major_version}
|
|
|
|
%{_bindir}/lua%{major_version}
|
|
|
|
%{_bindir}/luac%{major_version}
|
|
|
|
%{_mandir}/man1/lua%{major_version}.1.gz
|
|
|
|
%{_mandir}/man1/luac%{major_version}.1.gz
|
|
|
|
%ghost %{_sysconfdir}/alternatives/lua
|
|
|
|
%ghost %{_sysconfdir}/alternatives/luac
|
|
|
|
%ghost %{_sysconfdir}/alternatives/lua.1.gz
|
|
|
|
%ghost %{_sysconfdir}/alternatives/luac.1.gz
|
|
|
|
|
2017-07-07 13:41:38 +00:00
|
|
|
%files -n %libname
|
2017-07-07 13:14:29 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/liblua.so.%{major_version}
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config %{_sysconfdir}/rpm/macros.lua
|
|
|
|
%{_includedir}/lauxlib.h
|
|
|
|
%{_includedir}/lua.h
|
|
|
|
%{_includedir}/lua.hpp
|
|
|
|
%{_includedir}/luaconf.h
|
|
|
|
%{_includedir}/lualib.h
|
|
|
|
%{_libdir}/liblua.a
|
|
|
|
%{_libdir}/liblua.so
|
|
|
|
%{_libdir}/pkgconfig/lua.pc
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc doc/*
|
|
|
|
|
|
|
|
%changelog
|