#2929: Lua Modules
-------------------------------------+--------------------------------------
Reporter: a...@… | Owner: blfs-b...@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5
Component: BOOK | Version: SVN
Severity: normal | Keywords:
-------------------------------------+--------------------------------------
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 : 0.112737 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 : 0.024813 kbytes
Md5sum : 8e7b2a9b899d669280456d0f95afd961
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 : 0.026439 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 : 0.106273 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 : 0.041941 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 : 0.067838 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.416362 kbytes
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 : 0.049159 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/
--
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/2929>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page