From 3770f928d8eeb4d6c4d7eb21392fe960521dd8cf Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sat, 23 Aug 2014 11:26:01 +0200 Subject: [PATCH 1/7] Create luasec-scm-1.rockspec --- luasec-scm-1.rockspec | 92 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 luasec-scm-1.rockspec diff --git a/luasec-scm-1.rockspec b/luasec-scm-1.rockspec new file mode 100644 index 0000000..a277cdf --- /dev/null +++ b/luasec-scm-1.rockspec @@ -0,0 +1,92 @@ +package = "LuaSec" +version = "0.5-2" +source = { + url = "git://github.com/brunoos/luasec.git", + tag = "luasec-0.5" +} +description = { + summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.", + detailed = "This version delegates to LuaSocket the TCP connection establishment between the client and server. Then LuaSec uses this connection to start a secure TLS/SSL session.", + homepage = "https://github.com/brunoos/luasec/wiki", + license = "MIT" +} +dependencies = { + "lua >= 5.1", "luasocket" +} +external_dependencies = { + platforms = { + unix = { + OPENSSL = { + header = "openssl/ssl.h", + library = "ssl" + } + } + } +} +build = { + type = "builtin", + copy_directories = { + "samples" + }, + platforms = { + unix = { + install = { + lib = { + "ssl.so" + }, + lua = { + "src/ssl.lua", ['ssl.https'] = "src/https.lua" + } + }, + modules = { + ssl = { + incdirs = { + "$(OPENSSL_INCDIR)", "src/", "src/luasocket", + }, + libdirs = { + "$(OPENSSL_LIBDIR)" + }, + libraries = { + "ssl", "crypto" + }, + sources = { + "src/x509.c", "src/context.c", "src/ssl.c", + "src/luasocket/buffer.c", "src/luasocket/io.c", + "src/luasocket/timeout.c", "src/luasocket/usocket.c" + } + } + } + }, + windows = { + install = { + lib = { + "ssl.dll" + }, + lua = { + "src/ssl.lua", ['ssl.https'] = "src/https.lua" + } + }, + modules = { + ssl = { + defines = { + "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LUASEC_EXPORTS", "BUFFER_DEBUG", "LUASEC_API=__declspec(dllexport)" + }, + libdirs = { + "$(OPENSSL_LIBDIR)", + }, + libraries = { + "ssl", "crypto", "wsock32", + }, + incdirs = { + "$(OPENSSL_INCDIR)", "src/", "src/luasocket" + }, + sources = { + "src/x509.c", "src/context.c", "src/ssl.c", + "src/luasocket/buffer.c", "src/luasocket/io.c", + "src/luasocket/timeout.c", "src/luasocket/wsocket.c" + } + } + } + } + } +} From 0c58a8f9b8d4dc373d9cdf5587787e381d1bfdf6 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sun, 24 Aug 2014 09:21:27 +0200 Subject: [PATCH 2/7] Updated (and renamed) rockspec Windows Added several missing entries for the windows platform --- luasec-scm-1.rockspec => luasec-0.5-3.rockspec | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) rename luasec-scm-1.rockspec => luasec-0.5-3.rockspec (93%) diff --git a/luasec-scm-1.rockspec b/luasec-0.5-3.rockspec similarity index 93% rename from luasec-scm-1.rockspec rename to luasec-0.5-3.rockspec index a277cdf..59090ed 100644 --- a/luasec-scm-1.rockspec +++ b/luasec-0.5-3.rockspec @@ -1,5 +1,5 @@ package = "LuaSec" -version = "0.5-2" +version = "0.5-3" source = { url = "git://github.com/brunoos/luasec.git", tag = "luasec-0.5" @@ -14,14 +14,10 @@ dependencies = { "lua >= 5.1", "luasocket" } external_dependencies = { - platforms = { - unix = { - OPENSSL = { - header = "openssl/ssl.h", - library = "ssl" - } - } - } + OPENSSL = { + header = "openssl/ssl.h", + library = "ssl", + }, } build = { type = "builtin", From 65da178ca392a7e74b4606bc84ff409d0ef14ff4 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 2 Mar 2015 11:11:25 +0100 Subject: [PATCH 3/7] alternative rockspec --- luasec-0.5-3.rockspec | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/luasec-0.5-3.rockspec b/luasec-0.5-3.rockspec index 59090ed..7c37039 100644 --- a/luasec-0.5-3.rockspec +++ b/luasec-0.5-3.rockspec @@ -14,10 +14,19 @@ dependencies = { "lua >= 5.1", "luasocket" } external_dependencies = { - OPENSSL = { - header = "openssl/ssl.h", - library = "ssl", - }, + platforms = { + unix = { + OPENSSL = { + header = "openssl/ssl.h", + library = "ssl" + } + }, + windows = { + OPENSSL = { + header = "openssl/ssl.h", + } + }, + } } build = { type = "builtin", @@ -65,13 +74,13 @@ build = { modules = { ssl = { defines = { - "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LUASEC_EXPORTS", "BUFFER_DEBUG", "LUASEC_API=__declspec(dllexport)" + "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", "BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)" }, libdirs = { "$(OPENSSL_LIBDIR)", }, libraries = { - "ssl", "crypto", "wsock32", + "libeay32", "ssleay32", "ws2_32" }, incdirs = { "$(OPENSSL_INCDIR)", "src/", "src/luasocket" From 474b105087227471d4b8d35f6c673f536732795c Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 2 Mar 2015 11:21:48 +0100 Subject: [PATCH 4/7] use winsock 2 --- luasec-0.5-3.rockspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luasec-0.5-3.rockspec b/luasec-0.5-3.rockspec index 59090ed..b346b63 100644 --- a/luasec-0.5-3.rockspec +++ b/luasec-0.5-3.rockspec @@ -71,7 +71,7 @@ build = { "$(OPENSSL_LIBDIR)", }, libraries = { - "ssl", "crypto", "wsock32", + "ssl", "crypto", "ws2_32", }, incdirs = { "$(OPENSSL_INCDIR)", "src/", "src/luasocket" From 932465c66a36c267391f69a49cbcf718f0f0b3e3 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 2 Mar 2015 11:33:37 +0100 Subject: [PATCH 5/7] gitignore build artifacts --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..355518b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/src/*.o +/src/luasocket/*.o +/*.dll From b6327b95b433044efe9cbc716dbbb7abe0d78916 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 2 Mar 2015 11:43:40 +0100 Subject: [PATCH 6/7] updated defines in rockspec --- luasec-0.5-3.rockspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luasec-0.5-3.rockspec b/luasec-0.5-3.rockspec index b346b63..a045a29 100644 --- a/luasec-0.5-3.rockspec +++ b/luasec-0.5-3.rockspec @@ -65,7 +65,7 @@ build = { modules = { ssl = { defines = { - "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LUASEC_EXPORTS", "BUFFER_DEBUG", "LUASEC_API=__declspec(dllexport)" + "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", "BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)" }, libdirs = { "$(OPENSSL_LIBDIR)", From 9183cb724f57aa497650b2f9ea1d17c7bce9aba0 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 2 Mar 2015 13:25:49 +0100 Subject: [PATCH 7/7] added bindir to lib section, as mingw links against dll's to be found in bindir --- luasec-0.5-3.rockspec | 1 + 1 file changed, 1 insertion(+) diff --git a/luasec-0.5-3.rockspec b/luasec-0.5-3.rockspec index 7c37039..caa6665 100644 --- a/luasec-0.5-3.rockspec +++ b/luasec-0.5-3.rockspec @@ -78,6 +78,7 @@ build = { }, libdirs = { "$(OPENSSL_LIBDIR)", + "$(OPENSSL_BINDIR)", }, libraries = { "libeay32", "ssleay32", "ws2_32"