debian/0000755000000000000000000000000012202123777007171 5ustar debian/lua5.1.03-serial.dh-lua.conf0000644000000000000000000000075112202123777013717 0ustar PKG_NAME=socket.serial CLIB_CFLAGS=-I src/ -I src/ -DLUASOCKET_NODEBUG -DLUA_NOCOMPAT_MODULE -DLUASOCKET_API='__attribute__((visibility("default")))' -DUNIX_API='__attribute__((visibility("default")))' -DMIME_API='__attribute__((visibility("default")))' -pedantic -Wall -Wshadow -Wextra -Wimplicit -fvisibility=hidden CLIB_OBJS=src/buffer.lo src/auxiliar.lo src/options.lo \ src/timeout.lo src/io.lo src/usocket.lo src/serial.lo LUA_MODNAME=socket.serial LUA_MODNAME_CPART=socket.serial debian/lua5.1.02-unix.dh-lua.conf0000644000000000000000000000104612202123777013420 0ustar PKG_NAME=socket.unix CLIB_CFLAGS=-I src/ -I src/ -DLUASOCKET_NODEBUG -DLUA_NOCOMPAT_MODULE -DLUASOCKET_API='__attribute__((visibility("default")))' -DUNIX_API='__attribute__((visibility("default")))' -DMIME_API='__attribute__((visibility("default")))' -pedantic -Wall -Wshadow -Wextra -Wimplicit -fvisibility=hidden CLIB_OBJS=src/buffer.lo src/auxiliar.lo src/options.lo \ src/timeout.lo src/io.lo src/usocket.lo src/unix.lo LUA_HEADER=src/unix.h LUA_MODNAME=socket.unix LUA_MODNAME_CPART=socket.unix # retro compatibility stuff VERSION_INFO=2:0:0 debian/lua-socket-dev.docs0000644000000000000000000000001612202123777012663 0ustar doc/ samples/ debian/watch0000644000000000000000000000037512202123777010227 0ustar # test this watch file using: # uscan --watchfile debian/watch --upstream-version 0.0.1 --package luasocket # version=3 opts=uversionmangle=s/-/~/,dversionmangle=s/\.dfsg\.\d+$// \ https://github.com/diegonehab/luasocket/tags .*archive/v(.*)\.tar\.gz debian/lua-socket-dev.install.in0000644000000000000000000000145012202123777014011 0ustar include @@TEMPLATE@@/dev.install.in usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-mime.so usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-mime.a test -z "@@CLIB_OBJS@@" || echo usr/lib/@@DEB_HOST_MULTIARCH@@/pkgconfig/@@LUA@@-mime.pc usr/include/@@LUA@@/mime.h usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-socket-unix.so usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-socket-unix.a test -z "@@CLIB_OBJS@@" || echo usr/lib/@@DEB_HOST_MULTIARCH@@/pkgconfig/@@LUA@@-socket-unix.pc usr/include/@@LUA@@/unix.h usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-socket-serial.so usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-socket-serial.a test -z "@@CLIB_OBJS@@" || echo usr/lib/@@DEB_HOST_MULTIARCH@@/pkgconfig/@@LUA@@-socket-serial.pc usr/include/@@LUA@@/lua-socket-serial.h debian/lua-socket.install.in0000644000000000000000000000066712202123777013246 0ustar include @@TEMPLATE@@/lib.install.in usr/lib/@@DEB_HOST_MULTIARCH@@/lua/@@LUA_VERSION@@/mime/core.so usr/lib/@@DEB_HOST_MULTIARCH@@/lua/@@LUA_VERSION@@/socket/unix.so usr/lib/@@DEB_HOST_MULTIARCH@@/lua/@@LUA_VERSION@@/socket/serial.so usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-mime.so.* usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-socket-unix.so.* usr/lib/@@DEB_HOST_MULTIARCH@@/liblua@@LUA_VERSION@@-socket-serial.so.* debian/rules0000755000000000000000000000016512202123777010253 0ustar #!/usr/bin/make -f %: dh $@ --buildsystem=lua --with lua override_dh_installdocs: dh_installdocs -Xdoc/lua05.ppt debian/lua5.2.04-socket.dh-lua.conf0000777000000000000000000000000012202123777020461 2lua5.1.04-socket.dh-lua.confustar debian/compat0000644000000000000000000000000212202123777010367 0ustar 8 debian/lua5.2.02-unix.dh-lua.conf0000777000000000000000000000000012202123777017643 2lua5.1.02-unix.dh-lua.confustar debian/lua5.2.01-mime.dh-lua.conf0000777000000000000000000000000012202123777017551 2lua5.1.01-mime.dh-lua.confustar debian/source/0000755000000000000000000000000012202123777010471 5ustar debian/source/format0000644000000000000000000000001412202123777011677 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000001061012202123777011041 0ustar luasocket (3.0~rc1-3) unstable; urgency=low * Ship tp.lua and headers.lua (Closes: #719472) -- Enrico Tassi Mon, 12 Aug 2013 11:16:08 +0200 luasocket (3.0~rc1-2) unstable; urgency=low * Uploading to unstable * patch: export timeout_markstart symbol (needed by lua-sec) -- Enrico Tassi Fri, 09 Aug 2013 15:36:35 +0200 luasocket (3.0~rc1-1) experimental; urgency=low * New upstream release with Lua 5.2 support and IPv6 support (Closes: #562163) * Remove patch luaopen_socketunix (merged upstream) * Remove wheezy transitional packages * Add luasocket serial module to the package * Clean up the rules file using the features of dh-lua >= 17 * Packaging moved to git -- Enrico Tassi Fri, 04 May 2012 14:23:40 +0200 luasocket (2.0.2-8) unstable; urgency=low * Upload to unstable * cleanup dh-lua conf files -- Enrico Tassi Fri, 04 May 2012 13:37:45 +0200 luasocket (2.0.2-7) experimental; urgency=low * Bump standards-version to 3.9.3, no changes * Switch to dh-lua and dh >= 8 * Remove packages: liblua50-socket-dev liblua50-socket2 that were anyway broken and unusable * Packages renamed according to the new lua policy * Remove patches/build, no more needed -- Enrico Tassi Wed, 02 May 2012 16:07:49 +0200 luasocket (2.0.2-6) unstable; urgency=low * source format 3.0 (quilt) -- Enrico Tassi Thu, 21 Jul 2011 16:29:27 +0200 luasocket (2.0.2-5) unstable; urgency=low * Multi-Arch support (lua5.1 only, build-depend lua5.1-policy >= 32) -- Enrico Tassi Wed, 20 Jul 2011 15:10:37 +0200 luasocket (2.0.2-4) unstable; urgency=low * added patch to hide internal symbols, kudos to Stefan Bühler (Closes: #537049) * added ${misc:Depends} to Depends: * bumped standards-version to 3.8.2, no changes were needed -- Enrico Tassi Tue, 21 Jul 2009 00:39:37 +0200 luasocket (2.0.2-3) unstable; urgency=low * Renamed luasocket-doc.docs to liblua-socket-doc.docs so that documentation is ipart of the package (Closes: #457891) * Added Vcs-Browser and removed XS-X- from Vcs-Svn * Bumped Standards-Version to 3.7.3 * Placed -dev and -doc packages in the right sections * Added documentation to every dpatch patch -- Enrico Tassi Thu, 27 Dec 2007 02:03:37 +0100 luasocket (2.0.2-2) unstable; urgency=low * Renamed -doc package and added a Suggest field in control file (Closes: #449560) -- Enrico Tassi Sun, 11 Nov 2007 16:27:57 +0100 luasocket (2.0.2-1) unstable; urgency=low * New upstream release -- Enrico Tassi Fri, 15 Jun 2007 15:56:08 +0100 luasocket (2.0.1-4) unstable; urgency=low * Fixed .pc files that were empty -- Enrico Tassi Thu, 17 May 2007 12:56:11 +0200 luasocket (2.0.1-3) unstable; urgency=low * made control file binNMU safe * Fixed clean target (Closes: #424556) -- Enrico Tassi Wed, 16 May 2007 16:32:46 +0200 luasocket (2.0.1-2) unstable; urgency=low * Fixed watch file. * .pc files are now installed in the right place and with the right name (Closes: #411437) -- Enrico Tassi Mon, 19 Feb 2007 16:17:07 +0100 luasocket (2.0.1-1) unstable; urgency=low * new upstream release (Closes: #257256) * build for both lua50 and lua5.1 * updated to standards 3.7.2 * renamed packages for lua50 * New maintainer Enrico Tassi -- Enrico Tassi Thu, 14 Sep 2006 10:54:46 +0200 luasocket (2.0-alpha-2) unstable; urgency=low * Oops, build-depend missing an entry. Fool that I am -- Daniel Silverstone Wed, 15 Oct 2003 18:07:33 +0100 luasocket (2.0-alpha-1) unstable; urgency=low * Initial package release * Fixed make system to build shared objects properly * Included an implementation of bin2c to build Luasocket with * Included a nicer loadlib() interface for require. All you have to do is invoke lua50 -lluasocket or alternatively put: require "luasocket"; in your code. * Closes: #176992 which is the request to package luasocket -- Daniel Silverstone Tue, 14 Oct 2003 21:02:26 +0100 debian/copyright0000644000000000000000000000346712202123777011136 0ustar luasocket -- debianised by Daniel Silverstone and sucessively Enrico Tassi . Luasocket can be found at: http://www.cs.princeton.edu/~diego/professional/luasocket/ Luasocket is under the same terms and conditions as Lua itself, which is essentially the MIT license. See below for details. Lua License ----------- Lua is licensed under the terms of the MIT license reproduced below. This means that Lua is free software and can be used for both academic and commercial purposes at absolutely no cost. For details and rationale, see http://www.lua.org/license.html . =============================================================================== Copyright (C) 2004-2006 Diego Nehab. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =============================================================================== debian/lua5.2.03-serial.dh-lua.conf0000777000000000000000000000000012202123777020435 2lua5.1.03-serial.dh-lua.confustar debian/control0000644000000000000000000000245412202123777010601 0ustar Source: luasocket Section: interpreters Priority: optional Maintainer: Enrico Tassi Uploaders: Daniel Silverstone Build-Depends: debhelper (>= 8), dh-lua (>= 17) Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-lua/luasocket.git Vcs-Browser: http://git.debian.org/?p=pkg-lua/luasocket.git Homepage: http://w3.impa.br/~diego/software/luasocket/ Package: lua-socket Architecture: any Multi-Arch: same Pre-Depends: multiarch-support Depends: ${misc:Depends}, ${shlibs:Depends} Provides: ${lua:Provides} XB-Lua-Versions: ${lua:Versions} Description: TCP/UDP socket library for the Lua language Luasocket provides a TCP/UDP socket library for the Lua language . Also provided are HTTP and SMTP implementations, a simple FTP implementation and some URL parsing functions. . Luasocket supports blocking and non-blocking sockets and also provides a select() interface to the language. Package: lua-socket-dev Architecture: any Multi-Arch: same Pre-Depends: multiarch-support Depends: ${misc:Depends}, lua-socket (= ${binary:Version}) Provides: ${lua:Provides} XB-Lua-Versions: ${lua:Versions} Section: libdevel Description: TCP/UDP socket library for the Lua language This package provides the development headers and the static libraries for libluasocket. debian/lua5.1.04-socket.dh-lua.conf0000644000000000000000000000134512202123777013731 0ustar PKG_NAME=socket CLIB_CFLAGS=-I src/ -DLUASOCKET_NODEBUG -DLUA_NOCOMPAT_MODULE -DLUASOCKET_API='__attribute__((visibility("default")))' -DUNIX_API='__attribute__((visibility("default")))' -DMIME_API='__attribute__((visibility("default")))' -pedantic -Wall -Wshadow -Wextra -Wimplicit -fvisibility=hidden CLIB_LDFLAGS= CLIB_OBJS= src/luasocket.lo src/timeout.lo src/buffer.lo \ src/io.lo src/auxiliar.lo src/options.lo \ src/inet.lo src/tcp.lo src/udp.lo src/except.lo \ src/select.lo src/usocket.lo LUA_HEADER=src/luasocket.h LUA_SOURCES=$(wildcard src/*.lua) LUA_SOURCES_MANGLER=sed -e s?^src?socket? \ -e "s?socket/\\(mime\\|socket\\|ltn12\\).lua?\\1.lua?" LUA_MODNAME_CPART=socket.core # retro compatibility stuff VERSION_INFO=2:0:0 debian/lua5.1.01-mime.dh-lua.conf0000644000000000000000000000071212202123777013362 0ustar PKG_NAME=mime CLIB_CFLAGS=-I src/ -I src/ -DLUASOCKET_NODEBUG -DLUA_NOCOMPAT_MODULE -DLUASOCKET_API='__attribute__((visibility("default")))' -DUNIX_API='__attribute__((visibility("default")))' -DMIME_API='__attribute__((visibility("default")))' -pedantic -Wall -Wshadow -Wextra -Wimplicit -fvisibility=hidden CLIB_LDFLAGS= CLIB_OBJS= src/mime.lo LUA_HEADER=src/mime.h LUA_SOURCES= LUA_MODNAME_CPART=mime.core # retro compatibility stuff VERSION_INFO=2:0:0 debian/patches/0000755000000000000000000000000012202123777010620 5ustar debian/patches/series0000644000000000000000000000010012202123777012024 0ustar 0001-add-LUASOCKET_API-to-timeout_markstart-init-for-lua-.patch debian/patches/0001-add-LUASOCKET_API-to-timeout_markstart-init-for-lua-.patch0000644000000000000000000001712712202123777023555 0ustar From: Enrico Tassi Date: Fri, 9 Aug 2013 16:48:11 +0200 Subject: add LUASOCKET_API to timeout_markstart/init (for lua-sec) --- src/buffer.c | 12 ++++++------ src/io.c | 2 +- src/timeout.c | 6 +++--- src/usocket.c | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 4ef4e8e..e371c5e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -39,7 +39,7 @@ int buffer_open(lua_State *L) { /*-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/ -void buffer_init(p_buffer buf, p_io io, p_timeout tm) { +LUASOCKET_API void buffer_init(p_buffer buf, p_io io, p_timeout tm) { buf->first = buf->last = 0; buf->io = io; buf->tm = tm; @@ -50,7 +50,7 @@ void buffer_init(p_buffer buf, p_io io, p_timeout tm) { /*-------------------------------------------------------------------------*\ * object:getstats() interface \*-------------------------------------------------------------------------*/ -int buffer_meth_getstats(lua_State *L, p_buffer buf) { +LUASOCKET_API int buffer_meth_getstats(lua_State *L, p_buffer buf) { lua_pushnumber(L, (lua_Number) buf->received); lua_pushnumber(L, (lua_Number) buf->sent); lua_pushnumber(L, timeout_gettime() - buf->birthday); @@ -60,7 +60,7 @@ int buffer_meth_getstats(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * object:setstats() interface \*-------------------------------------------------------------------------*/ -int buffer_meth_setstats(lua_State *L, p_buffer buf) { +LUASOCKET_API int buffer_meth_setstats(lua_State *L, p_buffer buf) { buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received); buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent); if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4); @@ -71,7 +71,7 @@ int buffer_meth_setstats(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * object:send() interface \*-------------------------------------------------------------------------*/ -int buffer_meth_send(lua_State *L, p_buffer buf) { +LUASOCKET_API int buffer_meth_send(lua_State *L, p_buffer buf) { int top = lua_gettop(L); int err = IO_DONE; size_t size = 0, sent = 0; @@ -106,7 +106,7 @@ int buffer_meth_send(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * object:receive() interface \*-------------------------------------------------------------------------*/ -int buffer_meth_receive(lua_State *L, p_buffer buf) { +LUASOCKET_API int buffer_meth_receive(lua_State *L, p_buffer buf) { int err = IO_DONE, top = lua_gettop(L); luaL_Buffer b; size_t size; @@ -157,7 +157,7 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * Determines if there is any data in the read buffer \*-------------------------------------------------------------------------*/ -int buffer_isempty(p_buffer buf) { +LUASOCKET_API int buffer_isempty(p_buffer buf) { return buf->first >= buf->last; } diff --git a/src/io.c b/src/io.c index 35f46f7..89e40b9 100644 --- a/src/io.c +++ b/src/io.c @@ -10,7 +10,7 @@ /*-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/ -void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { +LUASOCKET_API void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { io->send = send; io->recv = recv; io->error = error; diff --git a/src/timeout.c b/src/timeout.c index bdd5e1c..3ea5a23 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -45,7 +45,7 @@ static luaL_Reg func[] = { /*-------------------------------------------------------------------------*\ * Initialize structure \*-------------------------------------------------------------------------*/ -void timeout_init(p_timeout tm, double block, double total) { +LUASOCKET_API void timeout_init(p_timeout tm, double block, double total) { tm->block = block; tm->total = total; } @@ -111,7 +111,7 @@ double timeout_getretry(p_timeout tm) { * Input * tm: timeout control structure \*-------------------------------------------------------------------------*/ -p_timeout timeout_markstart(p_timeout tm) { +LUASOCKET_API p_timeout timeout_markstart(p_timeout tm) { tm->start = timeout_gettime(); return tm; } @@ -158,7 +158,7 @@ int timeout_open(lua_State *L) { * time: time out value in seconds * mode: "b" for block timeout, "t" for total timeout. (default: b) \*-------------------------------------------------------------------------*/ -int timeout_meth_settimeout(lua_State *L, p_timeout tm) { +LUASOCKET_API int timeout_meth_settimeout(lua_State *L, p_timeout tm) { double t = luaL_optnumber(L, 2, -1); const char *mode = luaL_optstring(L, 3, "b"); switch (*mode) { diff --git a/src/usocket.c b/src/usocket.c index 096ecd0..5a9e4ad 100644 --- a/src/usocket.c +++ b/src/usocket.c @@ -20,7 +20,7 @@ #define WAITFD_R POLLIN #define WAITFD_W POLLOUT #define WAITFD_C (POLLIN|POLLOUT) -int socket_waitfd(p_socket ps, int sw, p_timeout tm) { +LUASOCKET_API int socket_waitfd(p_socket ps, int sw, p_timeout tm) { int ret; struct pollfd pfd; pfd.fd = *ps; @@ -74,7 +74,7 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) { /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ -int socket_open(void) { +LUASOCKET_API int socket_open(void) { /* instals a handler to ignore sigpipe or it will crash us */ signal(SIGPIPE, SIG_IGN); return 1; @@ -90,7 +90,7 @@ int socket_close(void) { /*-------------------------------------------------------------------------*\ * Close and inutilize socket \*-------------------------------------------------------------------------*/ -void socket_destroy(p_socket ps) { +LUASOCKET_API void socket_destroy(p_socket ps) { if (*ps != SOCKET_INVALID) { socket_setblocking(ps); close(*ps); @@ -358,7 +358,7 @@ int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm /*-------------------------------------------------------------------------*\ * Put socket into blocking mode \*-------------------------------------------------------------------------*/ -void socket_setblocking(p_socket ps) { +LUASOCKET_API void socket_setblocking(p_socket ps) { int flags = fcntl(*ps, F_GETFL, 0); flags &= (~(O_NONBLOCK)); fcntl(*ps, F_SETFL, flags); @@ -367,7 +367,7 @@ void socket_setblocking(p_socket ps) { /*-------------------------------------------------------------------------*\ * Put socket into non-blocking mode \*-------------------------------------------------------------------------*/ -void socket_setnonblocking(p_socket ps) { +LUASOCKET_API void socket_setnonblocking(p_socket ps) { int flags = fcntl(*ps, F_GETFL, 0); flags |= O_NONBLOCK; fcntl(*ps, F_SETFL, flags); @@ -404,7 +404,7 @@ const char *socket_hoststrerror(int err) { } } -const char *socket_strerror(int err) { +LUASOCKET_API const char *socket_strerror(int err) { if (err <= 0) return io_strerror(err); switch (err) { case EADDRINUSE: return "address already in use";