commit ae586ae3e705297f28823f52eeab43de86f4eea4
Author: Bartek Szady <[email protected]>
Date:   Sun Apr 5 11:12:14 2020 +0200

    updated to 0.9, uses lua 5.3

 lua-sec.spec   | 40 ++++++++++++++++++++++++++++------------
 makefile.patch | 13 +++++++++++++
 2 files changed, 41 insertions(+), 12 deletions(-)
---
diff --git a/lua-sec.spec b/lua-sec.spec
index 9482339..5397424 100644
--- a/lua-sec.spec
+++ b/lua-sec.spec
@@ -1,20 +1,32 @@
-%define                luaver 5.1
+# TODO
+# - use system lua-socket
+
+%define                luaver 5.3
+%define                real_name luasec
+
+%define                luasuffix %(echo %{luaver} | tr -d .)
+%if "%{luaver}" == "5.1"
+%define                luaincludedir %{_includedir}/lua51
+%else
+%define                luaincludedir %{_includedir}/lua%{luaver}
+%endif
 %define                lualibdir %{_libdir}/lua/%{luaver}
 %define                luapkgdir %{_datadir}/lua/%{luaver}
-%define                real_name luasec
+
 Summary:       Lua binding for OpenSSL library
-Name:          lua-sec
-Version:       0.5
+Name:          lua%{luasuffix}-sec
+Version:       0.9
 Release:       1
 License:       MIT
 Group:         Development/Libraries
-Source0:       
https://github.com/brunoos/luasec/archive/luasec-%{version}.tar.gz
-# Source0-md5: 0518f4524f399f33424c6f450e1d06db
+Source0:       
https://github.com/brunoos/luasec/archive/v%{version}/%{real_name}-%{version}.tar.gz
+# Source0-md5: b31b56f6bf034a8240fcc47f0f4041c8
+Patch0:                makefile.patch
 URL:           https://github.com/brunoos/luasec
-BuildRequires: lua-devel
-BuildRequires: lua-socket-devel
+BuildRequires: lua%{luasuffix}-devel
+#BuildRequires:        lua%{luasuffix}-socket-devel
 BuildRequires: openssl-devel
-Requires:      lua-socket
+#Requires:     lua%{luasuffix}-socket
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -23,7 +35,9 @@ takes an already established TCP connection and creates a 
secure
 session between the peers.
 
 %prep
-%setup -q -n %{real_name}-%{real_name}-%{version}
+%setup -q -n %{real_name}-%{version}
+%patch0 -p1
+
 for file in CHANGELOG LICENSE; do
        iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file
        touch -r $file $file.new
@@ -31,9 +45,11 @@ for file in CHANGELOG LICENSE; do
 done
 
 %build
+CFLAGS="%{rpmcppflags} %{rpmcflags}" \
+LDFLAGS="%{rpmldflags}" \
 %{__make} linux \
-       CC="%{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags}" \
-       INC_PATH="-I%{_includedir}/lua51"
+       CC="%{__cc}" \
+       INC_PATH="-I%{luaincludedir}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 0000000..fca56dd
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,13 @@
+--- luasec-0.9/src/Makefile.orig       2019-10-31 15:43:53.000000000 +0100
++++ luasec-0.9/src/Makefile    2020-04-05 21:48:04.580625050 +0200
+@@ -16,8 +16,8 @@
+ BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+ BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR)
+ 
+-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR)
++LNX_CFLAGS=-fPIC $(WARN) $(INCDIR) $(DEFS)
++LNX_LDFLAGS=-fPIC -shared $(LIBDIR)
+ 
+ MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)'
+ MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lua-sec.git/commitdiff/ae586ae3e705297f28823f52eeab43de86f4eea4

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to