Blame SPECS/lua-socket.spec

93099a
%if 0%{?fedora} >= 22 || 0%{?rhel} > 7
93099a
%define luaver 5.3
93099a
%else
93099a
%if 0%{?fedora} >= 20
93099a
%define luaver 5.2
93099a
%else
93099a
%define luaver 5.1
93099a
%endif
93099a
%endif
93099a
93099a
%define luacompatver 5.1
93099a
%define luacompatlibdir %{_libdir}/lua/%{luacompatver}
93099a
%define luacompatpkgdir %{_datadir}/lua/%{luacompatver}
93099a
%define lua51dir %{_builddir}/lua51-%{name}-%{version}-%{release}
93099a
93099a
%define lualibdir %{_libdir}/lua/%{luaver}
93099a
%define luapkgdir %{_datadir}/lua/%{luaver}
93099a
%global baseversion 3.0-rc1
93099a
%global upstreamname luasocket
93099a
93099a
Name:           lua-socket
93099a
Version:        3.0
93099a
Release:        0.17.rc1%{?dist}
93099a
Summary:        Network support for the Lua language
93099a
93099a
Group:          Development/Libraries
93099a
License:        MIT
93099a
URL:            http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/
93099a
#Source0:        http://luaforge.net/frs/download.php/2664/luasocket-%{baseversion}.tar.gz
93099a
Source0:        https://github.com/diegonehab/%{upstreamname}/archive/v%{baseversion}.tar.gz
93099a
Patch0:         luasocket-optflags.patch
93099a
# All changes in the upstream repo from %{baseversion} tag to the
93099a
# current master. Seems to be harmless.
93099a
Patch1:         luasocket-no-global-vars.patch
93099a
Patch2:         luasocket-3.0-settimeout.patch
93099a
93099a
BuildRequires:  lua >= %{luaver}, lua-devel >= %{luaver}
93099a
BuildRequires:  /usr/bin/iconv
93099a
Requires:       lua >= %{luaver}
93099a
93099a
%package devel
93099a
Summary:    Development files for %{name}
93099a
Group:      Development/Languages
93099a
Requires:   %{name}%{?_isa} = %{version}-%{release}
93099a
93099a
93099a
%description
93099a
LuaSocket is a Lua extension library that is composed by two parts: a C core
93099a
that provides support for the TCP and UDP transport layers, and a set of Lua
93099a
modules that add support for functionality commonly needed by applications
93099a
that deal with the Internet.
93099a
93099a
Among the support modules, the most commonly used implement the SMTP, HTTP
93099a
and FTP. In addition there are modules for MIME, URL handling and LTN12.
93099a
93099a
%description devel
93099a
Header files and libraries for building an extension library for the
93099a
Lua using %{name}
93099a
93099a
%if 0%{?fedora} >= 20
93099a
%package compat
93099a
Summary:        Network support for the Lua language 5.1
93099a
Group:          Development/Libraries
93099a
BuildRequires:  compat-lua >= %{luacompatver}, compat-lua-devel >= %{luacompatver}
93099a
93099a
%description compat
93099a
LuaSocket is a Lua extension library that is composed by two parts: a C core
93099a
that provides support for the TCP and UDP transport layers, and a set of Lua
93099a
modules that add support for functionality commonly needed by applications
93099a
that deal with the Internet.
93099a
93099a
Among the support modules, the most commonly used implement the SMTP, HTTP
93099a
and FTP. In addition there are modules for MIME, URL handling and LTN12.
93099a
%endif
93099a
93099a
%prep
93099a
%setup -q -n %{upstreamname}-%{baseversion}
93099a
%patch0 -p1 -b .optflags
93099a
%patch1 -p1 -b .noglobal
93099a
%patch2 -p1 -b .settimeout
93099a
93099a
%if 0%{?fedora} >= 20
93099a
rm -rf %{lua51dir}
93099a
cp -a . %{lua51dir}
93099a
%endif
93099a
93099a
%build
93099a
make %{?_smp_mflags} LUAV=%{luaver} OPTFLAGS="%{optflags} -fPIC" \
93099a
     LDFLAGS="%{build_ldflags} -shared -o " linux
93099a
/usr/bin/iconv -f ISO8859-1 -t UTF8 LICENSE >LICENSE.UTF8
93099a
mv -f LICENSE.UTF8 LICENSE
93099a
93099a
%if 0%{?fedora} >= 20
93099a
pushd %{lua51dir}
93099a
make %{?_smp_mflags} LUAV=%{luacompatver} \
93099a
    LUAINC_linux=%{_includedir}/lua-%{luacompatver} \
93099a
    OPTFLAGS="%{optflags} -fPIC" \
93099a
    LDFLAGS="%{build_ldflags} -O -shared -fpic -o " linux
93099a
/usr/bin/iconv -f ISO8859-1 -t UTF8 LICENSE >LICENSE.UTF8
93099a
mv -f LICENSE.UTF8 LICENSE
93099a
popd
93099a
%endif
93099a
93099a
%install
93099a
rm -rf $RPM_BUILD_ROOT
93099a
make install-unix OPTFLAGS="%{optflags}" INSTALL_TOP=$RPM_BUILD_ROOT \
93099a
    INSTALL_TOP_CDIR=$RPM_BUILD_ROOT%{lualibdir} \
93099a
    INSTALL_TOP_LDIR=$RPM_BUILD_ROOT%{luapkgdir}
93099a
93099a
# install development files
93099a
install -d $RPM_BUILD_ROOT%{_includedir}/%{upstreamname}
93099a
install -p src/*.h $RPM_BUILD_ROOT%{_includedir}/%{upstreamname}
93099a
93099a
%if 0%{?fedora} >= 20
93099a
pushd %{lua51dir}
93099a
make install-unix OPTFLAGS="%{optflags}" INSTALL_TOP=$RPM_BUILD_ROOT \
93099a
    INSTALL_TOP_CDIR=$RPM_BUILD_ROOT%{luacompatlibdir} \
93099a
    INSTALL_TOP_LDIR=$RPM_BUILD_ROOT%{luacompatpkgdir}
93099a
popd
93099a
%endif
93099a
93099a
93099a
%files
93099a
%defattr(-,root,root,-)
93099a
%{!?_licensedir:%global license %%doc}
93099a
%license LICENSE
93099a
%doc README doc/*
93099a
%{lualibdir}/*
93099a
%{luapkgdir}/*
93099a
93099a
%files devel
93099a
%defattr(-,root,root,-)
93099a
%{_includedir}/%{upstreamname}
93099a
93099a
%if 0%{?fedora} >= 20
93099a
%files compat
93099a
%defattr(-,root,root,-)
93099a
%{!?_licensedir:%global license %%doc}
93099a
%license LICENSE
93099a
%doc README doc/*
93099a
%{luacompatlibdir}/*
93099a
%{luacompatpkgdir}/*
93099a
%endif
93099a
93099a
%changelog
93099a
* Mon Apr 16 2018 Rafael dos Santos <rdossant@redhat.com> - 3.0-0.17.rc1
93099a
- Use standard Fedora linker flags (bug #1548713)
93099a
93099a
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.16.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
93099a
93099a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.15.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
93099a
93099a
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.14.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
93099a
93099a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.13.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
93099a
93099a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-0.12.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
93099a
93099a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.11.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
93099a
93099a
* Sun May 10 2015 Robert Scheck <robert@fedoraproject.org> 3.0-0.10.rc1
93099a
- Added upstream patch to fix settimeout() bug (#1220171)
93099a
93099a
* Mon May 04 2015 Robert Scheck <robert@fedoraproject.org> 3.0-0.9.rc1
93099a
- Fix broken release tag
93099a
93099a
* Fri Mar 20 2015 Bastien Nocera <bnocera@redhat.com> 3.0-0.8rc1.1
93099a
- Rebuild for new lua
93099a
93099a
* Fri Jan 16 2015 Tom Callaway <spot@fedoraproject.org> - 3.0-0.8rc1
93099a
- lua 5.3
93099a
93099a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.7rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
93099a
93099a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.6rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
93099a
93099a
* Thu May 22 2014 Jan Kaluza <jkaluza@redhat.com> - 3.0-0.5rc1
93099a
- build -compat subpackage against compat-lua
93099a
93099a
* Mon Sep 09 2013 Matěj Cepl <mcepl@redhat.com> - 3.0-0.4rc1
93099a
- Add -devel package.
93099a
93099a
* Fri Aug 23 2013 Matěj Cepl <mcepl@redhat.com> - 3.0-0.3rc1
93099a
- update to the 3.0rc1 from git
93099a
93099a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-0.2.rc1
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
93099a
93099a
* Fri May 10 2013 Tom Callaway <spot@fedoraproject.org> - 2.1-0.1.rc1
93099a
- update to 2.1rc1 from git
93099a
93099a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-9
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
93099a
93099a
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-8
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
93099a
93099a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-7
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
93099a
93099a
* Mon Oct 10 2011 Matthew Garrett <mjg@redhat.com> - 2.0.2-6
93099a
- Build support for Unix domain sockets (rhbz: #720692)
93099a
93099a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-5
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
93099a
93099a
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-4
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
93099a
93099a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-3
93099a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
93099a
93099a
* Sat Apr 05 2008 Tim Niemueller <tim@niemueller.de> - 2.0.2-2
93099a
- Pass proper CFLAGS to produce valid debuginfo
93099a
- Pass LICENSE file through iconv to produce proper UTF8
93099a
93099a
* Fri Apr 04 2008 Tim Niemueller <tim@niemueller.de> - 2.0.2-1
93099a
- Initial package
93099a