On Fri, Sep 16, 2011 at 11:44 AM, Reuben Thomas <r...@sc3d.org> wrote:
> On 16 September 2011 15:34, Reuben Thomas <r...@sc3d.org> wrote:
>> On 15 September 2011 23:46, Reuben Thomas <r...@sc3d.org> wrote:
>>> The one thing I can't see how to do after getting a working rockspec
>>> for both luaposix and stdlib is how to install .lua files in a
>>> different place from .so files. It's fairly common to install
>>> (arch-independent) .lua files once per system under
>>> /usr/local/share/lua/5.1 or similar, while .so files obviously go
>>> under /usr/local/lib/lua/5.1 or similar, and perhaps in a per-arch
>>> directory. This reflects a similar split between the default
>>> package.path and package.cpath on Linux.
>>>
>>> However, in my config.lua file I find only LIBDIR, which corresponds
>>> to package.cpath, but I can't find any LUADIR or SHAREDIR or similar
>>> (what GNU autotools calls 'datadir'). I can't see anything like this
>>> in the luarocks sources either.
>>
>> OK, I found LUADIR, but unlike LIBDIR I don't see how to configure it,
>> as it is not read from config.lua...
>
> OK, I found the documentation at
>
> http://luarocks.org/en/Config_file_format
>
> which says that LUADIR is read from the variables table of my config
> file. So I set:
>
> variables = {
>  LUADIR = "/home/rrt/local/share"
> }
>
> in my LUAROCKS_CONFIG file, but this seems to have no effect.

LUADIR, like PREFIX, is generated based on the rockspec you are
building. But do you really need to customize it? During the
deployment phase, all files installed in LUADIR are moved to the
proper $PREFIX/share/lua/5.1 (relative to the prefix of the tree
LuaRocks is working with).

So yes, during build, it uses a path such as
.../rocks/luaposix-5.1.12-1/lua/, but the files are then moved to
their final destinations (.../share/lua/5.1) during deployment. Things
are done this way to avoid having the build overwrite any files:
conflicts are handled during deployment.

-- 
-- Hisham
http://hisham.hm/ - http://colorbleed.com.br/

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to