From 40f3ea55e3e4ffddc3a24db7c3fe0f250c45b615 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Thu, 12 Apr 2012 14:57:59 +0800 Subject: [PATCH 1/3] first commit --- README | 1 + 1 file changed, 1 insertion(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..79abfc4 --- /dev/null +++ b/README @@ -0,0 +1 @@ +Alright, this is the first file I add to git. From 08297f6fdc990b648a1ed862e588b69de1424f0c Mon Sep 17 00:00:00 2001 From: moteus Date: Tue, 11 Jun 2013 15:46:11 +0400 Subject: [PATCH 2/3] Add. luasocket-scm-0.rockspec --- rockspecs/luasocket-scm-0.rockspec | 81 ++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 rockspecs/luasocket-scm-0.rockspec diff --git a/rockspecs/luasocket-scm-0.rockspec b/rockspecs/luasocket-scm-0.rockspec new file mode 100644 index 0000000..f2ef164 --- /dev/null +++ b/rockspecs/luasocket-scm-0.rockspec @@ -0,0 +1,81 @@ +package = "LuaSocket" +version = "scm-0" + +source = { + url = "https://github.com/diegonehab/luasocket/archive/master.zip", + dir = "luasocket-master", +} + +description = { + summary = "Network support for the Lua language", + detailed = [[ + LuaSocket is a Lua extension library that is composed by two parts: a C core + that provides support for the TCP and UDP transport layers, and a set of Lua + modules that add support for functionality commonly needed by applications + that deal with the Internet. + ]], + homepage = "http://luaforge.net/projects/luasocket/", + license = "MIT" +} + +dependencies = { + "lua >= 5.1, < 5.3" +} + +build = { + type = "make", + build_variables = { + PLAT="linux", + LUAINC_linux="$(LUA_INCDIR)" + }, + install_variables = { + INSTALL_TOP_LDIR = "$(LUADIR)", + INSTALL_TOP_CDIR = "$(LIBDIR)" + }, + platforms = { + macosx = { + build_variables = { + PLAT="macosx", + LUAINC_macosx="$(LUA_INCDIR)" + } + }, + windows={ + type= "builtin", + modules = { + ["mime.core"] = { + sources = {"src/mime.c"}, + defines = { + 'MIME_EXPORTS', + 'MIME_API=__declspec(dllexport)', + 'WIN32','_WIN32','_WINDOWS', + }, + }, + ["socket.core"] = { + sources = { + "src/auxiliar.c","src/buffer.c","src/except.c","src/timeout.c", + "src/luasocket.c","src/options.c","src/select.c", "src/wsocket.c", + "src/io.c","src/tcp.c","src/udp.c","src/inet.c" + }, + libraries = {"ws2_32", "iphlpapi"}, + defines = { + 'LUASOCKET_EXPORTS', + 'LUASOCKET_API=__declspec(dllexport)', + 'WIN32','_WIN32','_WINDOWS', + -- '_WIN32_WINNT=0x0501', 'LUASOCKET_INET_PTON', + }, + }, + ["ltn12" ] = "src/ltn12.lua", + ["mime" ] = "src/mime.lua", + ["socket" ] = "src/socket.lua", + ["socket.ftp" ] = "src/ftp.lua", + ["socket.http" ] = "src/http.lua", + ["socket.smtp" ] = "src/smtp.lua", + ["socket.tp" ] = "src/tp.lua", + ["socket.url" ] = "src/url.lua", + } + } + }, + copy_directories = { "doc", "samples", "etc", "test" } +} + +build.platforms.mingw32 = build.platforms.windows From 5b66b187972cc1fdffb52585b4b3bcefd2dab483 Mon Sep 17 00:00:00 2001 From: moteus Date: Tue, 11 Jun 2013 15:49:12 +0400 Subject: [PATCH 3/3] Add. .travis.yml file. --- .travis.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ee6cfc7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,54 @@ +language: erlang + +env: + global: + - LUAROCKS_BASE=luarocks-2.0.13 + matrix: + - LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1 + - LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2 + - LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0 + +branches: + only: + - master + +before_install: + - if [ $LUA = "luajit" ]; then + sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y; + fi + - sudo apt-get install $LUA + - sudo apt-get install $LUA_DEV + - lua$LUA_SFX -v + # Install a recent luarocks release + - wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz + - tar zxvpf $LUAROCKS_BASE.tar.gz + - cd $LUAROCKS_BASE + - ./configure + --lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR" + - sudo make + - sudo make install + - cd $TRAVIS_BUILD_DIR + + +install: + - export DEBUG=DEBUG + - sudo -E luarocks make rockspecs/luasocket-scm-0.rockspec + +script: + - cd test + - lua$LUA_SFX hello.lua + - lua$LUA_SFX testsrvr.lua > /dev/null & + - lua$LUA_SFX testclnt.lua + - lua$LUA_SFX stufftest.lua + - lua$LUA_SFX excepttest.lua + - lua$LUA_SFX test_bind.lua + - lua$LUA_SFX test_getaddrinfo.lua + - lua$LUA_SFX ltn12test.lua + - lua$LUA_SFX mimetest.lua + - lua$LUA_SFX urltest.lua + - lua$LUA_SFX test_socket_error.lua + +notifications: + email: + on_success: change + on_failure: always \ No newline at end of file