2017-07-14 08:36:43 +00:00
|
|
|
#
|
2017-07-14 08:43:42 +00:00
|
|
|
# spec file for package lua-luasocket
|
2017-07-14 08:36:43 +00:00
|
|
|
#
|
2019-03-13 13:35:11 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-07-14 08:36:43 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-13 13:35:11 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-07-14 08:36:43 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-07-07 22:55:24 +00:00
|
|
|
%define flavor @BUILD_FLAVOR@
|
2017-07-27 12:06:47 +00:00
|
|
|
%define mod_name luasocket
|
|
|
|
Name: %{flavor}-%{mod_name}
|
2017-07-14 09:12:55 +00:00
|
|
|
Version: 3.0~rc1+git20170515.5a17f79
|
2017-07-14 08:36:43 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Network support for the Lua language
|
|
|
|
License: MIT
|
2017-07-15 07:33:48 +00:00
|
|
|
Group: Development/Languages/Other
|
2017-07-14 08:36:43 +00:00
|
|
|
Url: https://github.com/diegonehab/luasocket
|
2017-07-14 09:12:55 +00:00
|
|
|
Source: %{mod_name}-%{version}.tar.xz
|
2017-07-14 08:36:43 +00:00
|
|
|
Patch0: luasocket-makefile.patch
|
2017-07-14 08:43:42 +00:00
|
|
|
BuildRequires: %{flavor}-devel
|
|
|
|
Requires: %{flavor}
|
2017-10-16 08:39:37 +00:00
|
|
|
%if "%{flavor}" == "lua53"
|
|
|
|
Provides: luasocket = %{version}
|
|
|
|
Obsoletes: luasocket < %{version}
|
|
|
|
%endif
|
2020-07-07 22:55:24 +00:00
|
|
|
%if "%{flavor}" == ""
|
2017-07-14 08:43:42 +00:00
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
2017-07-14 08:36:43 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
LuaSocket is a Lua extension library that is composed by two parts: a C core
|
|
|
|
that provides support for the TCP and UDP transport layers, and a set of Lua
|
|
|
|
modules that add support for functionality commonly needed by applications
|
|
|
|
that deal with the Internet.
|
|
|
|
|
|
|
|
Among the support modules, the most commonly used implement the SMTP, HTTP
|
|
|
|
and FTP. In addition there are modules for MIME, URL handling and LTN12.
|
|
|
|
|
2019-03-13 13:35:11 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Header files for %{flavor}-%{mod_name}
|
|
|
|
Group: Development/Languages/Other
|
|
|
|
Requires: %{flavor}-%{mod_name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This subpackage contains header files for developing applications that
|
|
|
|
want to make use of %{flavor}-%{mod_name}.
|
|
|
|
|
2017-07-14 08:36:43 +00:00
|
|
|
%prep
|
2017-07-14 08:43:42 +00:00
|
|
|
%setup -q -n %{mod_name}-%{version}
|
2017-07-14 08:36:43 +00:00
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{_bindir}/iconv -f ISO8859-1 -t UTF8 LICENSE >LICENSE.UTF8
|
|
|
|
mv -f LICENSE.UTF8 LICENSE
|
|
|
|
make %{?_smp_mflags} OPTFLAGS="%{optflags} -fPIC -I%{lua_incdir}" linux
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install-unix OPTFLAGS="%{optflags}" INSTALL_TOP=%{buildroot} INSTALL_TOP_CDIR=%{buildroot}%{lua_archdir} INSTALL_TOP_LDIR=%{buildroot}%{lua_noarchdir}
|
|
|
|
|
2019-03-13 13:35:11 +00:00
|
|
|
# install development files
|
|
|
|
install -d %{buildroot}%{lua_incdir}
|
|
|
|
install -p -m 0644 src/*.h %{buildroot}%{lua_incdir}
|
|
|
|
|
2017-07-14 08:36:43 +00:00
|
|
|
%files
|
2019-03-13 13:35:11 +00:00
|
|
|
%license LICENSE
|
2017-07-14 08:36:43 +00:00
|
|
|
%doc doc/*
|
2019-03-13 13:35:11 +00:00
|
|
|
%doc README
|
2017-07-14 08:36:43 +00:00
|
|
|
%{lua_archdir}/mime
|
|
|
|
%{lua_archdir}/socket
|
|
|
|
%{lua_noarchdir}/ltn12.lua
|
|
|
|
%{lua_noarchdir}/mime.lua
|
|
|
|
%{lua_noarchdir}/socket.lua
|
|
|
|
%{lua_noarchdir}/socket/
|
|
|
|
|
2019-03-13 13:35:11 +00:00
|
|
|
%files devel
|
|
|
|
%{lua_incdir}/*.h
|
|
|
|
|
2017-07-14 08:36:43 +00:00
|
|
|
%changelog
|