[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Distributions and Package Management
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 28 Sep 2013 15:45:49 +0200
On Thu, Sep 26, 2013 at 6:18 PM, Sean Conner <sean@conman.org> wrote:
> Coming from the Unix world, I'm used to the "configure; make; make
> install" method of installation [1]. And unless I change it with some
> options to configure, everything ends up installed in /usr/local.
As a practical contribution to this otherwise entertaining discussion,
I've put together a generic installer script here:
https://gist.github.com/stevedonovan/6742163
The basic idea is that you customize the script and put a little
install function up front. For instance, LDoc is easy, since it's just
a matter of creating a wrapper which points to ldoc.lua in the dir you
extracted the archive:
function install()
requires ('pl','Penlight')
install_script 'ldoc'
end
Penlight itself would be (the pl directory is a subdir of lua)
function install()
requires('lfs','luafilesystem')
from 'lua'
install_lua_package 'pl'
end
Currently this script is sitting uneasily between 'dead simple' and
'covers everything'; I have had to make assumptions. On Unix, if you
run as su, scripts go to /usr/local/bin and modules go to the usual
places. If not su, it will try to find a directory on the Lua module
path which is user-writeable, and ditto for /home/user/bin for
scripts.
On Windows, the only standard locations for executables are the ones
you are not supposed to write to, su or no. So I write scripts into
the directory of the Lua interpreter.
It's the kind of thing which badly needs command-line parameters,
although if we could keep these to under a dozen then 'install --help'
will be easier to read ;)
steve d.