|
|
4c1658c |
%{!?lua_version: %global lua_version %{lua: print(string.sub(_VERSION, 5))}}
|
|
|
4c1658c |
%{!?lua_libdir: %global lua_libdir %{_libdir}/lua/%{lua_version}}
|
|
|
4c1658c |
%{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}}
|
|
|
c6f1a54 |
|
|
|
4c1658c |
%{!?lua_compat_version: %global lua_compat_version 5.1}
|
|
|
4c1658c |
%{!?lua_compat_libdir: %global lua_compat_libdir %{_libdir}/lua/%{lua_compat_version}}
|
|
|
4c1658c |
%{!?lua_compat_pkgdir: %global lua_compat_pkgdir %{_datadir}/lua/%{lua_compat_version}}
|
|
|
4c1658c |
%{!?lua_compat_builddir: %global lua_compat_builddir %{_builddir}/compat-lua-%{name}-%{version}-%{release}}
|
|
|
8c1da1f |
|
|
|
4c1658c |
Summary: Network support for the Lua language
|
|
|
8c1da1f |
Name: lua-socket
|
|
|
8f3cbfa |
Version: 3.0
|
|
|
4c1658c |
Release: 0.27.rc1%{?dist}
|
|
|
8c1da1f |
License: MIT
|
|
|
8c1da1f |
URL: http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/
|
|
|
4c1658c |
Source0: https://github.com/diegonehab/luasocket/archive/v%{version}-rc1/luasocket-%{version}-rc1.tar.gz
|
|
|
e321e4c |
Patch0: luasocket-optflags.patch
|
|
|
8f3cbfa |
Patch1: luasocket-no-global-vars.patch
|
|
|
e321e4c |
Patch2: luasocket-3.0-settimeout.patch
|
|
|
4c1658c |
Requires: lua(abi) = %{lua_version}
|
|
|
3be3576 |
BuildRequires: gcc
|
|
|
4c1658c |
BuildRequires: make
|
|
|
4c1658c |
BuildRequires: lua >= %{lua_version}
|
|
|
4c1658c |
BuildRequires: lua-devel >= %{lua_version}
|
|
|
ba0a52a |
|
|
|
8c1da1f |
%description
|
|
|
4c1658c |
LuaSocket is a Lua extension library that is composed by two parts: The C
|
|
|
4c1658c |
core that provides support for the TCP and UDP transport layers, and the
|
|
|
4c1658c |
set of Lua modules that add support for functionality commonly needed by
|
|
|
4c1658c |
applications that deal with the Internet.
|
|
|
8c1da1f |
|
|
|
8c1da1f |
Among the support modules, the most commonly used implement the SMTP, HTTP
|
|
|
8c1da1f |
and FTP. In addition there are modules for MIME, URL handling and LTN12.
|
|
|
8c1da1f |
|
|
|
4c1658c |
%package devel
|
|
|
4c1658c |
Summary: Development files for %{name}
|
|
|
4c1658c |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
c6f1a54 |
|
|
|
4c1658c |
%description devel
|
|
|
4c1658c |
Header files necessary for developing and building an extension library
|
|
|
4c1658c |
for Lua using lua-socket.
|
|
|
4c1658c |
|
|
|
4c1658c |
%if 0%{?fedora}
|
|
|
4c1658c |
%package -n lua%{lua_compat_version}-socket
|
|
|
4c1658c |
Summary: Network support for the Lua %{lua_compat_version} language
|
|
|
4c1658c |
Obsoletes: lua-socket-compat < 3.0-0.28.rc1
|
|
|
4c1658c |
Provides: lua-socket-compat = %{version}-%{release}
|
|
|
4c1658c |
Provides: lua-socket-compat%{?_isa} = %{version}-%{release}
|
|
|
4c1658c |
Requires: lua(abi) = %{lua_compat_version}
|
|
|
4c1658c |
BuildRequires: compat-lua >= %{lua_compat_version}
|
|
|
4c1658c |
BuildRequires: compat-lua-devel >= %{lua_compat_version}
|
|
|
4c1658c |
|
|
|
4c1658c |
%description -n lua%{lua_compat_version}-socket
|
|
|
4c1658c |
LuaSocket is a Lua %{lua_compat_version} extension library that is composed by two parts: The
|
|
|
4c1658c |
C core that provides support for the TCP and UDP transport layers, and the
|
|
|
4c1658c |
set of Lua %{lua_compat_version} modules that add support for functionality commonly needed by
|
|
|
4c1658c |
applications that deal with the Internet.
|
|
|
c6f1a54 |
|
|
|
c6f1a54 |
Among the support modules, the most commonly used implement the SMTP, HTTP
|
|
|
c6f1a54 |
and FTP. In addition there are modules for MIME, URL handling and LTN12.
|
|
|
c6f1a54 |
%endif
|
|
|
ba0a52a |
|
|
|
8c1da1f |
%prep
|
|
|
4c1658c |
%setup -q -n luasocket-%{version}-rc1
|
|
|
8f3cbfa |
%patch0 -p1 -b .optflags
|
|
|
8f3cbfa |
%patch1 -p1 -b .noglobal
|
|
|
e321e4c |
%patch2 -p1 -b .settimeout
|
|
|
8c1da1f |
|
|
|
4c1658c |
%if 0%{?fedora}
|
|
|
4c1658c |
rm -rf %{lua_compat_builddir}
|
|
|
4c1658c |
cp -a . %{lua_compat_builddir}
|
|
|
c6f1a54 |
%endif
|
|
|
c6f1a54 |
|
|
|
8c1da1f |
%build
|
|
|
4c1658c |
%make_build linux \
|
|
|
4c1658c |
LUAV=%{lua_version} \
|
|
|
4c1658c |
LUAINC_linux=%{_includedir} \
|
|
|
4c1658c |
OPTFLAGS="$RPM_OPT_FLAGS -fPIC -DLUA_COMPAT_APIINTCASTS" \
|
|
|
4c1658c |
LDFLAGS="$RPM_LD_FLAGS -shared -o "
|
|
|
4c1658c |
|
|
|
4c1658c |
%if 0%{?fedora}
|
|
|
4c1658c |
pushd %{lua_compat_builddir}
|
|
|
4c1658c |
%make_build linux \
|
|
|
4c1658c |
LUAV=%{lua_compat_version} \
|
|
|
4c1658c |
LUAINC_linux=%{_includedir}/lua-%{lua_compat_version} \
|
|
|
4c1658c |
OPTFLAGS="$RPM_OPT_FLAGS -fPIC" \
|
|
|
4c1658c |
LDFLAGS="$RPM_LD_FLAGS -shared -o "
|
|
|
c6f1a54 |
popd
|
|
|
c6f1a54 |
%endif
|
|
|
8c1da1f |
|
|
|
4c1658c |
# Convert charset of license file to UTF-8
|
|
|
4c1658c |
iconv -f ISO-8859-1 -t UTF-8 -o LICENSE.UTF-8 LICENSE
|
|
|
4c1658c |
touch -c -r LICENSE{,.UTF-8}
|
|
|
4c1658c |
mv -f LICENSE{.UTF-8,}
|
|
|
4c1658c |
|
|
|
8c1da1f |
%install
|
|
|
4c1658c |
make install-unix INSTALL_DATA='install -p -m 644' \
|
|
|
4c1658c |
INSTALL_TOP=$RPM_BUILD_ROOT \
|
|
|
4c1658c |
INSTALL_TOP_CDIR=$RPM_BUILD_ROOT%{lua_libdir} \
|
|
|
4c1658c |
INSTALL_TOP_LDIR=$RPM_BUILD_ROOT%{lua_pkgdir}
|
|
|
4c1658c |
|
|
|
4c1658c |
%if 0%{?fedora}
|
|
|
4c1658c |
pushd %{lua_compat_builddir}
|
|
|
4c1658c |
make install-unix INSTALL_DATA='install -p -m 644' \
|
|
|
4c1658c |
INSTALL_TOP=$RPM_BUILD_ROOT \
|
|
|
4c1658c |
INSTALL_TOP_CDIR=$RPM_BUILD_ROOT%{lua_compat_libdir} \
|
|
|
4c1658c |
INSTALL_TOP_LDIR=$RPM_BUILD_ROOT%{lua_compat_pkgdir}
|
|
|
c6f1a54 |
popd
|
|
|
c6f1a54 |
%endif
|
|
|
8c1da1f |
|
|
|
4c1658c |
# Install development headers
|
|
|
4c1658c |
mkdir -p $RPM_BUILD_ROOT%{_includedir}/luasocket/
|
|
|
4c1658c |
install -p -m 644 src/*.h $RPM_BUILD_ROOT%{_includedir}/luasocket/
|
|
|
4c1658c |
|
|
|
4c1658c |
%check
|
|
|
4c1658c |
lua -e \
|
|
|
4c1658c |
'package.cpath="%{buildroot}%{lua_libdir}/?.so;"..package.cpath;
|
|
|
4c1658c |
package.path="%{buildroot}%{lua_pkgdir}/?.lua;"..package.path;
|
|
|
4c1658c |
dofile("test/hello.lua");'
|
|
|
4c1658c |
|
|
|
4c1658c |
%if 0%{?fedora}
|
|
|
4c1658c |
lua-%{lua_compat_version} -e \
|
|
|
4c1658c |
'package.cpath="%{buildroot}%{lua_compat_libdir}/?.so;"..package.cpath;
|
|
|
4c1658c |
package.path="%{buildroot}%{lua_compat_pkgdir}/?.lua;"..package.path;
|
|
|
4c1658c |
dofile("test/hello.lua");'
|
|
|
4c1658c |
%endif
|
|
|
8c1da1f |
|
|
|
8c1da1f |
%files
|
|
|
e321e4c |
%license LICENSE
|
|
|
4c1658c |
%doc NEW README doc/*
|
|
|
4c1658c |
%{lua_libdir}/mime/
|
|
|
4c1658c |
%{lua_libdir}/socket/
|
|
|
4c1658c |
%{lua_pkgdir}/*.lua
|
|
|
4c1658c |
%{lua_pkgdir}/socket/
|
|
|
8c1da1f |
|
|
|
ba0a52a |
%files devel
|
|
|
4c1658c |
%{_includedir}/luasocket/
|
|
|
ba0a52a |
|
|
|
4c1658c |
%if 0%{?fedora}
|
|
|
4c1658c |
%files -n lua%{lua_compat_version}-socket
|
|
|
e321e4c |
%license LICENSE
|
|
|
4c1658c |
%doc NEW README doc/*
|
|
|
4c1658c |
%{lua_compat_libdir}/mime/
|
|
|
4c1658c |
%{lua_compat_libdir}/socket/
|
|
|
4c1658c |
%{lua_compat_pkgdir}/*.lua
|
|
|
4c1658c |
%{lua_compat_pkgdir}/socket/
|
|
|
c6f1a54 |
%endif
|
|
|
8c1da1f |
|
|
|
8c1da1f |
%changelog
|
|
|
4c1658c |
* Sun Jan 03 2021 Robert Scheck <robert@fedoraproject.org> 3.0-0.27.rc1
|
|
|
4c1658c |
- Spec file modernization with basic %%check for Lua module
|
|
|
4c1658c |
- Renamed subpackage lua-socket-compat to lua5.1-socket (for Fedora)
|
|
|
4c1658c |
|
|
Bastien Nocera |
e3c7b5a |
* Wed Sep 23 2020 Bastien Nocera <bnocera@redhat.com> - 3.0-0.26.rc1
|
|
|
c6c79d9 |
- Fix for Lua >= 5.3 (#1873634)
|
|
Bastien Nocera |
e3c7b5a |
|
|
|
431556e |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.25.rc1
|
|
|
431556e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
431556e |
|
|
|
7b3a0bb |
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 3.0-0.24.rc1
|
|
|
7b3a0bb |
- Use make macros
|
|
|
7b3a0bb |
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
|
|
7b3a0bb |
|
|
|
3e42e17 |
* Tue Jun 30 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0-0.23.rc1
|
|
|
3e42e17 |
- Rebuilt for Lua 5.4
|
|
|
3e42e17 |
|
|
|
bfed422 |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.22.rc1
|
|
|
bfed422 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
bfed422 |
|
|
|
4f14b39 |
* Fri Nov 29 2019 Kalev Lember <klember@redhat.com> - 3.0-0.21.rc1
|
|
|
4f14b39 |
- Require lua(abi) instead of just lua
|
|
|
4f14b39 |
|
|
|
1c13b31 |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.20.rc1
|
|
|
1c13b31 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
1c13b31 |
|
|
|
0ca989e |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.19.rc1
|
|
|
0ca989e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
0ca989e |
|
|
|
dd29603 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.18.rc1
|
|
|
dd29603 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
dd29603 |
|
|
|
6369687 |
* Mon Apr 16 2018 Rafael dos Santos <rdossant@redhat.com> - 3.0-0.17.rc1
|
|
|
6369687 |
- Use standard Fedora linker flags (bug #1548713)
|
|
|
6369687 |
|
|
|
1d19b9c |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.16.rc1
|
|
|
1d19b9c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
1d19b9c |
|
|
|
2fe9aea |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.15.rc1
|
|
|
2fe9aea |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
2fe9aea |
|
|
|
a611132 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.14.rc1
|
|
|
a611132 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
a611132 |
|
|
|
a02d1d7 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.13.rc1
|
|
|
a02d1d7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
a02d1d7 |
|
|
|
bcc427d |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.12.rc1
|
|
|
bcc427d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
bcc427d |
|
|
|
9ba92ab |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.11.rc1
|
|
|
9ba92ab |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
9ba92ab |
|
|
|
e321e4c |
* Sun May 10 2015 Robert Scheck <robert@fedoraproject.org> 3.0-0.10.rc1
|
|
|
e321e4c |
- Added upstream patch to fix settimeout() bug (#1220171)
|
|
|
e321e4c |
|
|
|
7181e80 |
* Mon May 04 2015 Robert Scheck <robert@fedoraproject.org> 3.0-0.9.rc1
|
|
|
7181e80 |
- Fix broken release tag
|
|
|
7181e80 |
|
|
Bastien Nocera |
87f41f8 |
* Fri Mar 20 2015 Bastien Nocera <bnocera@redhat.com> 3.0-0.8rc1.1
|
|
Bastien Nocera |
87f41f8 |
- Rebuild for new lua
|
|
Bastien Nocera |
87f41f8 |
|
|
|
e42f03b |
* Fri Jan 16 2015 Tom Callaway <spot@fedoraproject.org> - 3.0-0.8rc1
|
|
|
e42f03b |
- lua 5.3
|
|
|
e42f03b |
|
|
|
1411574 |
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.7rc1
|
|
|
1411574 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
1411574 |
|
|
|
5779fc4 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.6rc1
|
|
|
5779fc4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
5779fc4 |
|
|
|
c6f1a54 |
* Thu May 22 2014 Jan Kaluza <jkaluza@redhat.com> - 3.0-0.5rc1
|
|
|
c6f1a54 |
- build -compat subpackage against compat-lua
|
|
|
c6f1a54 |
|
|
|
ba0a52a |
* Mon Sep 09 2013 Matěj Cepl <mcepl@redhat.com> - 3.0-0.4rc1
|
|
|
ba0a52a |
- Add -devel package.
|
|
|
ba0a52a |
|
|
|
8f3cbfa |
* Fri Aug 23 2013 Matěj Cepl <mcepl@redhat.com> - 3.0-0.3rc1
|
|
|
8f3cbfa |
- update to the 3.0rc1 from git
|
|
|
8f3cbfa |
|
|
|
1ccf12d |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-0.2.rc1
|
|
|
1ccf12d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
1ccf12d |
|
|
|
99f0cb4 |
* Fri May 10 2013 Tom Callaway <spot@fedoraproject.org> - 2.1-0.1.rc1
|
|
|
99f0cb4 |
- update to 2.1rc1 from git
|
|
|
99f0cb4 |
|
|
|
b24600f |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-9
|
|
|
b24600f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
b24600f |
|
|
|
6501aa7 |
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-8
|
|
|
6501aa7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
6501aa7 |
|
|
|
4f21d73 |
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-7
|
|
|
4f21d73 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
4f21d73 |
|
|
|
8f3cbfa |
* Mon Oct 10 2011 Matthew Garrett <mjg@redhat.com> - 2.0.2-6
|
|
Matthew Garrett |
ea794d2 |
- Build support for Unix domain sockets (rhbz: #720692)
|
|
Matthew Garrett |
ea794d2 |
|
|
|
63ccb7d |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-5
|
|
|
63ccb7d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
63ccb7d |
|
|
|
7920905 |
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-4
|
|
|
7920905 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
7920905 |
|
|
|
bfd9e51 |
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-3
|
|
|
bfd9e51 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
bfd9e51 |
|
|
|
8c1da1f |
* Sat Apr 05 2008 Tim Niemueller <tim@niemueller.de> - 2.0.2-2
|
|
|
8c1da1f |
- Pass proper CFLAGS to produce valid debuginfo
|
|
|
8c1da1f |
- Pass LICENSE file through iconv to produce proper UTF8
|
|
|
8c1da1f |
|
|
|
8c1da1f |
* Fri Apr 04 2008 Tim Niemueller <tim@niemueller.de> - 2.0.2-1
|
|
|
8c1da1f |
- Initial package
|