[lua-cyrussasl] Initial import

Robert Scheck robert at fedoraproject.org
Tue Jul 29 18:12:09 UTC 2014


commit 74664f0190fff016a2235d9733b1f2ea4da6c002
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Tue Jul 29 20:11:59 2014 +0200

    Initial import

 .gitignore                       |    1 +
 lua-cyrussasl-1.0.0-lua_52.patch |   28 +++++++++++++++++++++
 lua-cyrussasl.spec               |   50 ++++++++++++++++++++++++++++++++++++++
 sources                          |    1 +
 4 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2d2df88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v1.?.?.tar.gz
diff --git a/lua-cyrussasl-1.0.0-lua_52.patch b/lua-cyrussasl-1.0.0-lua_52.patch
new file mode 100644
index 0000000..febeab8
--- /dev/null
+++ b/lua-cyrussasl-1.0.0-lua_52.patch
@@ -0,0 +1,28 @@
+Backport of upstream patch by Ivan <lintech at yandex.ru> for lua-cyrussasl <= 1.0.0 which
+adds compatibility for Lua 5.2. For further information please also have a look to:
+https://github.com/JorjBauer/lua-cyrussasl/commit/e6fd132ba80411e8949680c8f73838d6a883937c
+
+--- lua-cyrussasl-1.0.0/cyrussasl.c			2010-07-06 19:01:15.000000000 +0200
++++ lua-cyrussasl-1.0.0/cyrussasl.c.lua_52		2014-05-28 13:48:07.704955466 +0200
+@@ -1,5 +1,4 @@
+ #include <lua.h>
+-#include <lauxlib.h>
+ 
+ #include <sasl/sasl.h>
+ #include <sasl/saslutil.h>
+@@ -813,13 +812,13 @@
+ }
+ 
+ /* metatable, hook for calling gc_context on context structs */
+-static const luaL_reg meta[] = {
++static const luaL_Reg meta[] = {
+   { "__gc", gc_context },
+   { NULL,   NULL        }
+ };
+ 
+ /* function table for this module */
+-static const struct luaL_reg methods[] = {
++static const struct luaL_Reg methods[] = {
+   { "setssf",       cyrussasl_setssf            },
+   { "setprop",      cyrussasl_sasl_setprop      },
+   { "listmech",     cyrussasl_sasl_listmech     },
diff --git a/lua-cyrussasl.spec b/lua-cyrussasl.spec
new file mode 100644
index 0000000..97a9107
--- /dev/null
+++ b/lua-cyrussasl.spec
@@ -0,0 +1,50 @@
+%if 0%{?fedora} >= 20 || 0%{?rhel} > 7
+%define luaver 5.2
+%else
+%define luaver 5.1
+%endif
+%define lualibdir %{_libdir}/lua/%{luaver}
+
+Summary:	Cyrus SASL library for Lua
+Name:		lua-cyrussasl
+Version:	1.0.0
+Release:	1%{?dist}
+License:	BSD
+Group:		Development/Libraries
+URL:		https://github.com/JorjBauer/lua-cyrussasl
+Source:		https://github.com/JorjBauer/%{name}/archive/v%{version}.tar.gz
+Patch0:		lua-cyrussasl-1.0.0-lua_52.patch
+%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
+Requires:	lua(abi) = %{luaver}
+%else
+Requires:	lua >= %{luaver}
+%endif
+BuildRequires:	lua-devel, cyrus-sasl-devel
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+Lua bindings for the Cyrus SASL APIs.
+
+%prep
+%setup -q
+%patch0 -p1 -b .lua_52
+
+%build
+make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC" LDFLAGS="-shared -fPIC -lsasl2 %{?__global_ldflags}" 
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -D -p -m 755 cyrussasl.so $RPM_BUILD_ROOT%{lualibdir}/cyrussasl.so
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE README
+%{lualibdir}/cyrussasl.so
+
+%changelog
+* Wed May 28 2014 Robert Scheck <robert at fedoraproject.org> 1.0.0-1
+- Upgrade to 1.0.0
+- Initial spec file for Fedora and Red Hat Enterprise Linux
diff --git a/sources b/sources
index e69de29..b9aa7a7 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3f9ba054b7138c777b388191bf344c7d  v1.0.0.tar.gz


More information about the scm-commits mailing list