|
|
ba0a52a |
%if 0%{?fedora} >= 20 || 0%{?rhel} > 7
|
|
|
99f0cb4 |
%define luaver 5.2
|
|
|
ba0a52a |
%else
|
|
|
ba0a52a |
%define luaver 5.1
|
|
|
ba0a52a |
%endif
|
|
|
ba0a52a |
|
|
|
c6f1a54 |
%define luacompatver 5.1
|
|
|
c6f1a54 |
%define luacompatlibdir %{_libdir}/lua/%{luacompatver}
|
|
|
c6f1a54 |
%define luacompatpkgdir %{_datadir}/lua/%{luacompatver}
|
|
|
c6f1a54 |
%define lua51dir %{_builddir}/lua51-%{name}-%{version}-%{release}
|
|
|
c6f1a54 |
|
|
|
8c1da1f |
%define lualibdir %{_libdir}/lua/%{luaver}
|
|
|
8c1da1f |
%define luapkgdir %{_datadir}/lua/%{luaver}
|
|
|
8f3cbfa |
%global baseversion 3.0-rc1
|
|
|
8f3cbfa |
%global upstreamname luasocket
|
|
|
8c1da1f |
|
|
|
8c1da1f |
Name: lua-socket
|
|
|
8f3cbfa |
Version: 3.0
|
|
|
c6f1a54 |
Release: 0.5rc1%{?dist}
|
|
|
8c1da1f |
Summary: Network support for the Lua language
|
|
|
8c1da1f |
|
|
|
8c1da1f |
Group: Development/Libraries
|
|
|
8c1da1f |
License: MIT
|
|
|
8c1da1f |
URL: http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/
|
|
|
8f3cbfa |
#Source0: http://luaforge.net/frs/download.php/2664/luasocket-%{baseversion}.tar.gz
|
|
|
8f3cbfa |
Source0: https://github.com/diegonehab/%{upstreamname}/archive/v%{baseversion}.tar.gz
|
|
|
8f3cbfa |
Patch0: luasocket-optflags.patch
|
|
|
8f3cbfa |
# All changes in the upstream repo from %{baseversion} tag to the
|
|
|
8f3cbfa |
# current master. Seems to be harmless.
|
|
|
8f3cbfa |
Patch1: luasocket-no-global-vars.patch
|
|
|
8c1da1f |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
8c1da1f |
|
|
|
8c1da1f |
BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver}
|
|
|
8c1da1f |
BuildRequires: /usr/bin/iconv
|
|
|
8c1da1f |
Requires: lua >= %{luaver}
|
|
|
8c1da1f |
|
|
|
c6f1a54 |
%if 0%{?fedora} >= 20
|
|
|
c6f1a54 |
BuildRequires: compat-lua >= %{luacompatver}, compat-lua-devel >= %{luacompatver}
|
|
|
c6f1a54 |
%endif
|
|
|
c6f1a54 |
|
|
|
ba0a52a |
%package devel
|
|
|
ba0a52a |
Summary: Development files for %{name}
|
|
|
ba0a52a |
Group: Development/Languages
|
|
|
ba0a52a |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ba0a52a |
|
|
|
ba0a52a |
|
|
|
8c1da1f |
%description
|
|
|
8c1da1f |
LuaSocket is a Lua extension library that is composed by two parts: a C core
|
|
|
8c1da1f |
that provides support for the TCP and UDP transport layers, and a set of Lua
|
|
|
8c1da1f |
modules that add support for functionality commonly needed by applications
|
|
|
8c1da1f |
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 |
|
|
|
ba0a52a |
%description devel
|
|
|
ba0a52a |
Header files and libraries for building an extension library for the
|
|
|
ba0a52a |
Lua using %{name}
|
|
|
ba0a52a |
|
|
|
c6f1a54 |
%if 0%{?fedora} >= 20
|
|
|
c6f1a54 |
%package compat
|
|
|
c6f1a54 |
Summary: Network support for the Lua language 5.1
|
|
|
c6f1a54 |
Group: Development/Libraries
|
|
|
c6f1a54 |
|
|
|
c6f1a54 |
%description compat
|
|
|
c6f1a54 |
LuaSocket is a Lua extension library that is composed by two parts: a C core
|
|
|
c6f1a54 |
that provides support for the TCP and UDP transport layers, and a set of Lua
|
|
|
c6f1a54 |
modules that add support for functionality commonly needed by applications
|
|
|
c6f1a54 |
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
|
|
|
8f3cbfa |
%setup -q -n %{upstreamname}-%{baseversion}
|
|
|
8f3cbfa |
%patch0 -p1 -b .optflags
|
|
|
8f3cbfa |
%patch1 -p1 -b .noglobal
|
|
|
8c1da1f |
|
|
|
c6f1a54 |
%if 0%{?fedora} >= 20
|
|
|
c6f1a54 |
rm -rf %{lua51dir}
|
|
|
c6f1a54 |
cp -a . %{lua51dir}
|
|
|
c6f1a54 |
%endif
|
|
|
c6f1a54 |
|
|
|
8c1da1f |
%build
|
|
|
c6f1a54 |
make %{?_smp_mflags} LUAV=%{luaver} OPTFLAGS="%{optflags} -fPIC" linux
|
|
|
8c1da1f |
/usr/bin/iconv -f ISO8859-1 -t UTF8 LICENSE >LICENSE.UTF8
|
|
|
8c1da1f |
mv -f LICENSE.UTF8 LICENSE
|
|
|
8c1da1f |
|
|
|
c6f1a54 |
%if 0%{?fedora} >= 20
|
|
|
c6f1a54 |
pushd %{lua51dir}
|
|
|
c6f1a54 |
make %{?_smp_mflags} LUAV=%{luacompatver} LUAINC_linux=%{_includedir}/lua-%{luacompatver} OPTFLAGS="%{optflags} -fPIC" linux
|
|
|
c6f1a54 |
/usr/bin/iconv -f ISO8859-1 -t UTF8 LICENSE >LICENSE.UTF8
|
|
|
c6f1a54 |
mv -f LICENSE.UTF8 LICENSE
|
|
|
c6f1a54 |
popd
|
|
|
c6f1a54 |
%endif
|
|
|
8c1da1f |
|
|
|
8c1da1f |
%install
|
|
|
8c1da1f |
rm -rf $RPM_BUILD_ROOT
|
|
|
ba0a52a |
make install-unix OPTFLAGS="%{optflags}" INSTALL_TOP=$RPM_BUILD_ROOT \
|
|
|
ba0a52a |
INSTALL_TOP_CDIR=$RPM_BUILD_ROOT%{lualibdir} \
|
|
|
ba0a52a |
INSTALL_TOP_LDIR=$RPM_BUILD_ROOT%{luapkgdir}
|
|
|
ba0a52a |
|
|
|
ba0a52a |
# install development files
|
|
|
ba0a52a |
install -d $RPM_BUILD_ROOT%{_includedir}/%{upstreamname}
|
|
|
ba0a52a |
install -p src/*.h $RPM_BUILD_ROOT%{_includedir}/%{upstreamname}
|
|
|
8c1da1f |
|
|
|
c6f1a54 |
%if 0%{?fedora} >= 20
|
|
|
c6f1a54 |
pushd %{lua51dir}
|
|
|
c6f1a54 |
make install-unix OPTFLAGS="%{optflags}" INSTALL_TOP=$RPM_BUILD_ROOT \
|
|
|
c6f1a54 |
INSTALL_TOP_CDIR=$RPM_BUILD_ROOT%{luacompatlibdir} \
|
|
|
c6f1a54 |
INSTALL_TOP_LDIR=$RPM_BUILD_ROOT%{luacompatpkgdir}
|
|
|
c6f1a54 |
popd
|
|
|
c6f1a54 |
%endif
|
|
|
8c1da1f |
|
|
|
8c1da1f |
%clean
|
|
|
ba0a52a |
#rm -rf $RPM_BUILD_ROOT
|
|
|
8c1da1f |
|
|
|
8c1da1f |
|
|
|
8c1da1f |
%files
|
|
|
8c1da1f |
%defattr(-,root,root,-)
|
|
|
8c1da1f |
%doc doc/*
|
|
|
8c1da1f |
%doc README LICENSE
|
|
|
8c1da1f |
%{lualibdir}/*
|
|
|
8c1da1f |
%{luapkgdir}/*
|
|
|
8c1da1f |
|
|
|
ba0a52a |
%files devel
|
|
|
ba0a52a |
%defattr(-,root,root,-)
|
|
|
ba0a52a |
%{_includedir}/%{upstreamname}
|
|
|
ba0a52a |
|
|
|
c6f1a54 |
%if 0%{?fedora} >= 20
|
|
|
c6f1a54 |
%files compat
|
|
|
c6f1a54 |
%defattr(-,root,root,-)
|
|
|
c6f1a54 |
%doc doc/*
|
|
|
c6f1a54 |
%doc README LICENSE
|
|
|
c6f1a54 |
%{luacompatlibdir}/*
|
|
|
c6f1a54 |
%{luacompatpkgdir}/*
|
|
|
c6f1a54 |
%endif
|
|
|
8c1da1f |
|
|
|
8c1da1f |
%changelog
|
|
|
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
|
|
|
8c1da1f |
|