|
Petr Špaček |
22bf4e0 |
%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))" || echo 0)}
|
|
Petr Špaček |
22bf4e0 |
%global lualibdir %{_libdir}/lua/%{luaver}
|
|
Petr Špaček |
22bf4e0 |
%global luapkgdir %{_datadir}/lua/%{luaver}
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%global luacompatver 5.1
|
|
Petr Špaček |
22bf4e0 |
%global luacompatlibdir %{_libdir}/lua/%{luacompatver}
|
|
Petr Špaček |
22bf4e0 |
%global luacompatpkgdir %{_datadir}/lua/%{luacompatver}
|
|
Petr Špaček |
22bf4e0 |
|
|
|
b2233c6 |
%global luapkgname cqueues
|
|
|
b2233c6 |
|
|
|
b2233c6 |
Name: lua-%{luapkgname}
|
|
|
39265da |
Version: 20190813
|
|
|
39265da |
Release: 1%{?dist}
|
|
Petr Špaček |
22bf4e0 |
Summary: Stackable Continuation Queues for the Lua Programming Language
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
License: MIT
|
|
|
39265da |
URL: https://github.com/wahern/%{luapkgname}
|
|
|
39265da |
Source0: https://github.com/wahern/%{luapkgname}/archive/rel-%{version}/%{name}-%{version}.tar.gz
|
|
|
98fdd07 |
|
|
|
98fdd07 |
BuildRequires: gcc
|
|
|
98fdd07 |
BuildRequires: m4
|
|
|
98fdd07 |
BuildRequires: make
|
|
|
98fdd07 |
BuildRequires: openssl-devel
|
|
|
7f38b77 |
BuildRequires: lua
|
|
Petr Špaček |
22bf4e0 |
BuildRequires: lua-devel >= %{luaver}
|
|
|
98fdd07 |
|
|
|
7f38b77 |
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
7f38b77 |
BuildRequires: compat-lua
|
|
|
7f38b77 |
BuildRequires: compat-lua-devel
|
|
Petr Špaček |
22bf4e0 |
%endif
|
|
Petr Špaček |
22bf4e0 |
|
|
|
7f38b77 |
Requires: lua(abi) = %{luaver}
|
|
|
7f38b77 |
|
|
Petr Špaček |
22bf4e0 |
%description
|
|
Petr Špaček |
22bf4e0 |
cqueues is a type of event loop for Lua. It doesn't use callbacks but instead
|
|
Petr Špaček |
22bf4e0 |
you communicate with an event controller by the yielding and resumption of
|
|
Petr Špaček |
22bf4e0 |
Lua coroutines using objects.
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
cqueues are stackable. Each instantiated cqueue is a poll-able object which
|
|
Petr Špaček |
22bf4e0 |
can be polled from another cqueue, or another event loop system entirely.
|
|
Petr Špaček |
22bf4e0 |
The design is meant to be non-intrusive, composable, and embeddable within
|
|
Petr Špaček |
22bf4e0 |
existing applications.
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
cqueues includes a sockets library with DNS, buffering, end-of-line
|
|
Petr Špaček |
22bf4e0 |
translation, SSL/TLS, and descriptor passing support builtin.
|
|
Petr Špaček |
22bf4e0 |
Domain querying, connection establishment, and SSL negotiation are handled
|
|
Petr Špaček |
22bf4e0 |
transparently as part of a state machine entered with every I/O operation,
|
|
Petr Špaček |
22bf4e0 |
so users can read and write immediately upon instantiating the object,
|
|
Petr Špaček |
22bf4e0 |
as if opening a regular file.
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
cqueues also includes modules for handling signals, threads, and file change
|
|
Petr Špaček |
22bf4e0 |
notifications using native kernel facilities and accessible through easy
|
|
Petr Špaček |
22bf4e0 |
to use interfaces which abstract the different kernel facilities.
|
|
Petr Špaček |
22bf4e0 |
|
|
|
39265da |
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
b2233c6 |
%package -n lua%{luacompatver}-%{luapkgname}
|
|
Petr Špaček |
22bf4e0 |
Summary: Stackable Continuation Queues for the Lua Programming Language %{luacompatver}
|
|
|
39265da |
Requires: compat-lua-libs
|
|
|
39265da |
|
|
|
39265da |
# NOTE: remove Provides after F31 end of life
|
|
|
39265da |
%if 0%{?fedora} < 32 && "x%{?rhel}" == "x"
|
|
|
b2233c6 |
Provides: lua-%{luapkgname}-compat
|
|
|
b2233c6 |
Provides: compat-lua-%{luapkgname}
|
|
|
39265da |
%endif
|
|
Petr Špaček |
22bf4e0 |
|
|
|
b2233c6 |
%description -n lua%{luacompatver}-%{luapkgname}
|
|
Petr Špaček |
22bf4e0 |
Compatibility package for Lua %{luacompatver}
|
|
Petr Špaček |
22bf4e0 |
%endif
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%package doc
|
|
Petr Špaček |
22bf4e0 |
Summary: Documentation for the Stackable Continuation Queues library
|
|
Petr Špaček |
22bf4e0 |
BuildArch: noarch
|
|
Petr Špaček |
22bf4e0 |
# Conflicts: {name} != {version} + compat-{name} != {version} would have been better
|
|
Petr Špaček |
22bf4e0 |
# but I'm trying to avoid Conflicts
|
|
Petr Špaček |
22bf4e0 |
Requires: %{name} == %{version}
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%description doc
|
|
Petr Špaček |
22bf4e0 |
Documentation for the Stackable Continuation Queues library
|
|
Petr Špaček |
22bf4e0 |
for the Lua Programming Language
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%prep
|
|
|
39265da |
%setup -q -n %{luapkgname}-rel-%{version}
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%build
|
|
|
39265da |
export CFLAGS="%{?optflags} -fPIC"
|
|
|
39265da |
export LDFLAGS="%{?build_ldflags}"
|
|
|
7f38b77 |
make LUA_APIS="%{luaver}" %{?_smp_mflags} prefix=%{_prefix} libdir=%{_libdir}
|
|
Petr Špaček |
22bf4e0 |
|
|
|
39265da |
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
7f38b77 |
make LUA_APIS="%{luacompatver}" %{?_smp_mflags} prefix=%{_prefix} libdir=%{_libdir} CFLAGS="$CFLAGS -I%{_includedir}/lua-%{luacompatver}"
|
|
Petr Špaček |
22bf4e0 |
%endif
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%install
|
|
Petr Špaček |
22bf4e0 |
make install LUA_APIS="%{luaver}" DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir}
|
|
Petr Špaček |
22bf4e0 |
|
|
|
39265da |
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
Petr Špaček |
22bf4e0 |
make install LUA_APIS="%{luacompatver}" DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir}
|
|
Petr Špaček |
22bf4e0 |
%endif
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
# documentation
|
|
Petr Špaček |
22bf4e0 |
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
Petr Špaček |
22bf4e0 |
cp -r -t %{buildroot}%{_pkgdocdir} doc/cqueues.pdf examples
|
|
Petr Špaček |
22bf4e0 |
sed -i '1 s|^#!/.*$|#!/usr/bin/lua|' %{buildroot}%{_pkgdocdir}/examples/*
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
#% check
|
|
Petr Špaček |
22bf4e0 |
## Lua openssl package is missing
|
|
Petr Špaček |
22bf4e0 |
#make check -j1
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%files
|
|
Petr Špaček |
22bf4e0 |
%{luapkgdir}/*
|
|
Petr Špaček |
22bf4e0 |
%{lualibdir}/*
|
|
Petr Špaček |
22bf4e0 |
%license LICENSE
|
|
Petr Špaček |
22bf4e0 |
|
|
|
39265da |
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
b2233c6 |
%files -n lua%{luacompatver}-%{luapkgname}
|
|
Petr Špaček |
22bf4e0 |
%{luacompatpkgdir}/*
|
|
Petr Špaček |
22bf4e0 |
%{luacompatlibdir}/*
|
|
Petr Špaček |
22bf4e0 |
%license LICENSE
|
|
Petr Špaček |
22bf4e0 |
%endif
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%files doc
|
|
Petr Špaček |
22bf4e0 |
# force examples to be non-executable to avoid potential mess in autogenerated deps
|
|
Petr Špaček |
22bf4e0 |
%defattr(644,root,root,755)
|
|
|
98fdd07 |
%doc %{_pkgdocdir}/*
|
|
Petr Špaček |
22bf4e0 |
%license LICENSE
|
|
Petr Špaček |
22bf4e0 |
|
|
Petr Špaček |
22bf4e0 |
%changelog
|
|
|
39265da |
* Mon Oct 21 2019 Tomas Krizek <tomas.krizek@nic.cz> - 20190813-1
|
|
|
39265da |
- Make spec EPEL8 compatible
|
|
|
39265da |
- Update to latest upstream version, BZ#1735765
|
|
|
39265da |
|
|
|
34d966a |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20171014-7
|
|
|
34d966a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
34d966a |
|
|
|
b2233c6 |
* Tue Apr 16 2019 Tomas Krizek <tomas.krizek@nic.cz> - 20171014-6
|
|
|
b2233c6 |
- Use lua5.1-cqueues for Lua 5.1 package name
|
|
|
b2233c6 |
https://pagure.io/packaging-committee/issue/878
|
|
|
b2233c6 |
|
|
|
7f38b77 |
* Wed Apr 10 2019 Tomas Krizek <tomas.krizek@nic.cz> - 20171014-5
|
|
|
7f38b77 |
- Re-add compat-lua-devel needed for 5.1 build
|
|
|
7f38b77 |
|
|
|
98fdd07 |
* Thu Apr 04 2019 Tomas Krizek <tomas.krizek@nic.cz> - 20171014-4
|
|
|
98fdd07 |
- Compatibility patch for GCC 9, fixes BZ#1675333
|
|
|
98fdd07 |
- Clean up BuildRequires/Requires
|
|
|
98fdd07 |
|
|
|
35e42b0 |
* Thu Apr 04 2019 Tomas Krizek <tomas.krizek@nic.cz> - 20171014-3
|
|
|
35e42b0 |
- Change compat package name to compat-lua-cqueues
|
|
|
35e42b0 |
|
|
|
0e7ee3e |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20171014-2
|
|
|
0e7ee3e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
0e7ee3e |
|
|
Petr Špaček |
e0d3466 |
* Fri Jan 11 2019 Petr Špaček <petr.spacek@nic.cz> - 20171014-1
|
|
Petr Špaček |
e0d3466 |
- Rebuild for released Fedora/CentOS versions (fedpkg update was missing)
|
|
Petr Špaček |
e0d3466 |
|
|
Petr Špaček |
22bf4e0 |
* Thu Sep 13 2018 Petr Špaček <petr.spacek@nic.cz> - 20171014-0
|
|
Petr Špaček |
22bf4e0 |
- Initial package for Fedora 28+ and EPEL 7
|