I used torch distro repository on github and installed LuaJIT and luarocks.
I want to install luarocks packages , from source, that is downloading the packages(.zip files) and building them from source .
I tried doing it by downloading the packages from github and then running luarocks install modulename.rockspec . But here it again starts cloning from github.
Can anyone tell me the exact procedure to do this ?
You can use either source rocks or binary rocks.
Using source rocks
A source rock is a package with
.src.rock
extension containing the sources. You create it packing a rockspec:This produces bla-1.0-1.src.rock. Running
luarocks build bla-1.0-1.src.rock
does not use the network to buildbla
, but it will hit the network to fetch dependencies if needed. So you need to pack and install all dependencies beforehand.Using binary rocks
A binary rock is a compiled package with
.PLATFORM.rock
extension containing the .lua or .so/.dll modules. You create it building a module and then packing the code you built:This produces a binary rock, say
bla-1.0-1.linux-x86.rock
. Note however that to install this in another machine, the target machine needs to be fully ABI-compatible, that is, all installed libraries in the source and destination machine need to be compatible (e.g. same OS/distro version). For this reason, this is useful for deploying rocks to multiple machines in a farm, but not for distributing binary packages for end-users in general.Grouping packed rocks into a local server
Once you pack all rocks you need (and their dependencies) using one of the methods above, you can put them all in a directory, then turn it into a "local server":
This works with both source and binary rocks. You'll then be able to build rocks from there without fetching the network.