Opened 15 years ago

Closed 12 years ago

Last modified 7 years ago

#2929 closed enhancement (invalid)

Lua Modules

Reported by: Ag. Hatzimanikas Owned by: blfs-book@…
Priority: normal Milestone: x-future
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by Ag. Hatzimanikas)

A ticket to include Lua into the Book already exists (see #2926).

This is a ticket about a new page which will be called "Lua Modules".

In my opinion this page should try a bit to resemble the Python (similar) page, and (probably) it should be divided into at least two sections.

A first section, where we can provide instructions to build and install some basic and popular Lua modules, and a second one where we can provide instructions to build and use the LuaRocks module deployment system, which is written for Lua.

Below are the most basic Lua modules (information and instructions).

LuaSocket:
LuaSocket is a comprehensive networking support library for the Lua language.
Version       : 2.0.2
Home page     : http://luaforge.net/projects/luasocket/
Download      : http://luaforge.net/frs/download.php/2664
Download size : 110 kbytes
Md5sum        : 41445b138deb7bcfe97bff957503da8e
Dependencies  : None
Build instructions: make
make INSTALL_TOP_SHARE=/usr/share/lua/5.1  INSTALL_TOP_LIB=/usr/lib/lua/5.1 install
LuaFileSystem:
LuaFileSystem is a Lua library developed to complement the set of functions related
to file systems offered by the standard Lua distribution.
Version       : 1.4.2
Home page     : http://www.keplerproject.org/luafilesystem/index.html
Download      : http://luaforge.net/frs/download.php/3931
Download size : 25 kbytes
Md5sum        : 8e7b2a9b899d669280456d0f95afd961
Dependencies  : None
Build instructions: make && make PREFIX=/usr install


LuaPosix:
LuaPosix is a POSIX library for lua.
Version       : 5.1.4
Home page     : http://luaforge.net/projects/luaposix/
Download      : http://luaforge.net/frs/download.php/3572
Download size : 14 kbytes
Md5sum        : 073019b1a52bfddb94e2521553b47ef5
Dependencies  : None
Build instructions: make && make PREFIX=/usr install

LuaSec:
LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.
Version       : 0.3.1
Home page     : http://www.inf.puc-rio.br/~brunoos/luasec/
Download      : http://luaforge.net/frs/download.php/3920
Download size : 27 kbytes
Md5sum        : a88f2c05d22abfcc9ab92bd1d6f32b37
Dependencies  : LuaSocket, Openssl
Build instructions: make linux
make LUAPATH=/usr/share/lua/5.1 CPATH=/usr/lib/lua/5.1 install
LuaDoc: 
LuaDoc is a documentation generator tool for Lua source code.
Version       : 3.0.1
Home page     : http://luadoc.luaforge.net/index.html
Download      : http://luaforge.net/frs/download.php/3185
Download size : 107 kbytes
Md5sum        : ec3a0c0b9413e401a2d466cc0930d505
Dependencies  : LuaFileSystem, LuaLogging  
Build instructions: make PREFIX=/usr install

LuaLogging:
LuaLogging provides a simple API to use logging features in Lua.
Version       : 1.1.4
Home page     : http://www.keplerproject.org/lualogging/index.html
Download url  : http://luaforge.net/frs/download.php/2693
Download size : 42 kbytes
Md5sum        : 72a8622748a525f5fb8ed23278326f80
Dependencies  : LuaSql, LuaSocket
Build instructions: make PREFIX=/usr install
LuaSQL:
LuaSQL is a Lua interface to a DBMS.
Version       : 2.1.1
Home page     : http://www.keplerproject.org/luasql/index.html
Download      : http://luaforge.net/frs/download.php/2686
Download size : 68 kbytes
Md5sum        : 63bdd57de4b9d1be336ba112d8cb69eb
Dependencies  : Sqlite
Build instructions: make PREFIX=/usr install
Nixio:
Nixio is a multi-functional utility library for Lua.
Version       : 0.3
Home page     : http://dev.luci.freifunk-halle.net/nixio/doc/
Download      : http://dev.luci.freifunk-halle.net/nixio/
Download size : 1.3 Mb
Md5sum        : 7fa6a989cd2644347d969cb6e3a5c186
Dependencies  : Openssl or axtls (http://axtls.sourceforge.net/)
Build instructions: make LUA_MODULEDIR=/usr/share/lua/5.1  LUA_LIBRARYDIR=/usr/lib/lua/5.1 install

Below are instructions to build and install LuaRocks and an example to use its facilities to install a module:

LuaRocks:
LuaRocks is a deployment and management system for Lua modules.
Version       : 1.0.1
Home page     : http://www.luarocks.org
Download      : http://luaforge.net/frs/download.php/3727/
Download size : 50 kbytes
Md5sum        : c884fe3fae925bb30f770361e70e784e
Dependencies  : Wget or Curl
Build instructions: ./configure --prefix=/usr --sysconfdir=/etc/luarocks --with-downloader=curl
make && make install

Luarocks is installed under "/usr/share/lua/5.1/luarocks".

An example of using LuaRocks to install a module:

luarocks install luasocket

Of course the user needs to have root privileges, being root or using sudo.

Modules are installed under "/usr/lib/luarocks/rocks". Users should be able to use them in a Lua script or when using the interpreter, by putting the following line:

require("luarocks.require")

Alternatively a user can call the Lua interpreter with:

lua -lluarocks.require

The user it should be able then to use any module that was installed via LuaRocks.

Generally in Lua this can be done (to call a specific module within a script - lets say LuaSocket - when inserting the following line into a script:

require("socket")

One last thing. Luaforge is currently the kind host of many Lua projects, so I believe we should provide the link:

http://luaforge.net/

Change History (5)

comment:1 by Ag. Hatzimanikas, 15 years ago

Description: modified (diff)

Added LuaPosix.

comment:2 by Guy Dalziel, 15 years ago

Milestone: 6.5future
Owner: changed from blfs-book@… to Guy Dalziel
Status: newassigned

comment:3 by bdubbs@…, 12 years ago

Owner: changed from Guy Dalziel to blfs-book@…

comment:4 by rt, 12 years ago

Resolution: invalid
Status: assignedclosed

Keep as external dependency.

comment:5 by bdubbs@…, 7 years ago

Milestone: futurex-future

Milestone renamed

Note: See TracTickets for help on using tickets.