aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2016-06-17 11:17:26 -0300
committerGitHub <noreply@github.com>2016-06-17 11:17:26 -0300
commit30a64c585a444d3007976a4b4a1b8014d7797e04 (patch)
treeb1d51d39ee6ea65258950ad7edfa645f2c1774fa
parent6aa4f2bc333679b9adab3942a3dadce9fe357bcc (diff)
parent3abd1f2dd0855668a88aeb73e80860174435ae3d (diff)
downloadluasocket-30a64c585a444d3007976a4b4a1b8014d7797e04.tar.gz
luasocket-30a64c585a444d3007976a4b4a1b8014d7797e04.tar.bz2
luasocket-30a64c585a444d3007976a4b4a1b8014d7797e04.zip
Merge pull request #178 from pdxmeshnet/master
Add rockspec to current development version.
-rw-r--r--rockspec/luasocket-3.0rc2-1.rockspec105
1 files changed, 105 insertions, 0 deletions
diff --git a/rockspec/luasocket-3.0rc2-1.rockspec b/rockspec/luasocket-3.0rc2-1.rockspec
new file mode 100644
index 0000000..8e37a4a
--- /dev/null
+++ b/rockspec/luasocket-3.0rc2-1.rockspec
@@ -0,0 +1,105 @@
1package = "LuaSocket"
2version = "3.0rc2-1"
3source = {
4 url = "git://github.com/diegonehab/luasocket.git",
5 tag = "v3.0-rc2",
6}
7description = {
8 summary = "Network support for the Lua language",
9 detailed = [[
10 LuaSocket is a Lua extension library that is composed by two parts: a C core
11 that provides support for the TCP and UDP transport layers, and a set of Lua
12 modules that add support for functionality commonly needed by applications
13 that deal with the Internet.
14 ]],
15 homepage = "http://luaforge.net/projects/luasocket/",
16 license = "MIT"
17}
18dependencies = {
19 "lua >= 5.1"
20}
21
22local function make_plat(plat)
23 local defines = {
24 unix = {
25 "LUASOCKET_DEBUG",
26 "LUASOCKET_API=__attribute__((visibility(\"default\")))",
27 "UNIX_API=__attribute__((visibility(\"default\")))",
28 "MIME_API=__attribute__((visibility(\"default\")))"
29 },
30 macosx = {
31 "LUASOCKET_DEBUG",
32 "UNIX_HAS_SUN_LEN",
33 "LUASOCKET_API=__attribute__((visibility(\"default\")))",
34 "UNIX_API=__attribute__((visibility(\"default\")))",
35 "MIME_API=__attribute__((visibility(\"default\")))"
36 },
37 win32 = {
38 "LUASOCKET_DEBUG",
39 "NDEBUG",
40 "LUASOCKET_API=__declspec(dllexport)",
41 "MIME_API=__declspec(dllexport)"
42 },
43 mingw32 = {
44 "LUASOCKET_DEBUG",
45 "LUASOCKET_INET_PTON",
46 "WINVER=0x0501",
47 "LUASOCKET_API=__declspec(dllexport)",
48 "MIME_API=__declspec(dllexport)"
49 }
50 }
51 local modules = {
52 ["socket.core"] = {
53 sources = { "src/luasocket.c", "src/timeout.c", "src/buffer.c", "src/io.c", "src/auxiliar.c", "src/options.c", "src/inet.c", "src/except.c", "src/select.c", "src/tcp.c", "src/udp.c", "src/compat.c" },
54 defines = defines[plat],
55 incdir = "/src"
56 },
57 ["mime.core"] = {
58 sources = { "src/mime.c", "src/compat.c" },
59 defines = defines[plat],
60 incdir = "/src"
61 },
62 ["socket.http"] = "src/http.lua",
63 ["socket.url"] = "src/url.lua",
64 ["socket.tp"] = "src/tp.lua",
65 ["socket.ftp"] = "src/ftp.lua",
66 ["socket.headers"] = "src/headers.lua",
67 ["socket.smtp"] = "src/smtp.lua",
68 ltn12 = "src/ltn12.lua",
69 socket = "src/socket.lua",
70 mime = "src/mime.lua"
71 }
72 if plat == "unix" or plat == "macosx" or plat == "haiku" then
73 modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c"
74 if plat == "haiku" then
75 modules["socket.core"].libraries = {"network"}
76 end
77 modules["socket.unix"] = {
78 sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/unix.c" },
79 defines = defines[plat],
80 incdir = "/src"
81 }
82 modules["socket.serial"] = {
83 sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/serial.c" },
84 defines = defines[plat],
85 incdir = "/src"
86 }
87 end
88 if plat == "win32" or plat == "mingw32" then
89 modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c"
90 modules["socket.core"].libraries = { "ws2_32" }
91 end
92 return { modules = modules }
93end
94
95build = {
96 type = "builtin",
97 platforms = {
98 unix = make_plat("unix"),
99 macosx = make_plat("macosx"),
100 haiku = make_plat("haiku"),
101 win32 = make_plat("win32"),
102 mingw32 = make_plat("mingw32")
103 },
104 copy_directories = { "doc", "samples", "etc", "test" }
105}