On Wed, Oct 6, 2010 at 1:21 PM, steve donovan <[email protected]> wrote:
> maybe there isn't make! A rock can execute an arbitrary command as a
> post-install hook,
> The post-install hook could run an installed Lua program,
Since this isn't so clear from the docs, here's a simple example - a
very bare bones rockspec and little script:
-- fake-1.0-1.rockspec
package = 'fake'
version = '1.0-1'
source = {
url = 'http://fake'
}
build = {
type = 'none',
install = { bin = {'fake'} }
}
hooks = {
post_install = 'fake'
}
-- fake
#!/usr/bin/env lua
print 'hello world'
Running luarocks make in this directory will do exactly what you
expect; installs the little script, and then runs it.
Done on Linux, but it also works on Windows due to some clever script wrapping.
What you can do in that script is practically limitless.....for this
purpose, you can rely on the LuaRocks libraries being present and they
provide a portable way to access the filesystem etc. You can check
using os.execute whether there's a build system and then force
LuaRocks to install some more packages. It is a hack, but there are
possibilities.
steve d.
_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers