Hi Hisham,

Thanks for the quick solution.

On Sep 26, 2013, at 12:29 PM, Hisham <h...@hisham.hm> wrote:

> On 26 September 2013 01:20, Gary V. Vaughan <g...@vaughan.pe> wrote:
>> How do I find the contents of the copied doc tree from Lua (so that it works 
>> regardless of the rocks tree location that contains it)?
> 
> Finding resource files portably and with relocatable packages is
> always tricky...
> 
> I tried a first approach at tackling this problem with this:
> 
> https://github.com/hishamhm/datafile
> 

That's awesome! Thank you :)

> datafile is alpha-quality software though, but I really think we need
> a small portable library to avoid hardcoding paths to resource files.
> Unix people don't care a lot about making binary installations
> relocatable (even though I think they should), but on Windows at least
> I think it's expected that software shouldn't break if you choose to
> install a binary in a different folder.

Agreed.  And I like that distributing with LuaRocks forces me to take
that into account.

> (datafile supports 'contexts' which helps it finding files. I have
> 'config' and 'cache' right now as predefined contexts, which are
> inspired by freedesktop.org paths; "doc" probably deserves to be a
> predefined context as well.)

I was actually pretty surprised that LuaRocks doesn't promote `doc' up to
a parent directory like `bin' is.  It's a really nice feature of LuaRocks
that after installing the Zile (and Specl!) rocks, the zmacs (and specl!)
binaries are promoted into my PATH, without any extra fuss.

Unix has a tradition of packages populating /usr/share/doc/<package> and
/usr/share/man/man1/<package>.1, or similar, and thus users are used to
being able to poke around in those directories to find documentation
when they get stuck.  Is there any way to set up my rockspec so that
the manual pages and documents end up where users will expect to find
them after installation (and preferably in such a way that `datafile' or
similar will still be able to access them)?

Cheers,
-- 
Gary V. Vaughan (gary AT vaughan DOT pe)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to