diff options
Diffstat (limited to '')
-rw-r--r-- | docs/luarocks.md | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/docs/luarocks.md b/docs/luarocks.md new file mode 100644 index 00000000..91bb6731 --- /dev/null +++ b/docs/luarocks.md | |||
@@ -0,0 +1,102 @@ | |||
1 | # luarocks | ||
2 | |||
3 | **luarocks** is the command-line interface for LuaRocks, the Lua package manager. | ||
4 | |||
5 | # Usage | ||
6 | |||
7 | ``` | ||
8 | luarocks [--server=<server> | --only-server=<server>] [--tree=<tree>] [--only-sources=<url>] [--deps-mode=<mode>] [<VAR>=<VALUE>]... <command> [<argument>] | ||
9 | ``` | ||
10 | |||
11 | Variables from the "variables" table of the [configuration file](config_file_format.md) can be overriden with VAR=VALUE assignments. | ||
12 | |||
13 | {| | ||
14 | | --server=_server_ || Fetch rocks/rockspecs from this server (takes priority over config file) | ||
15 | |- | ||
16 | | --only-server=_server_ || Fetch rocks/rockspecs from this server only (overrides any entries in the config file) | ||
17 | |- | ||
18 | | --only-sources=_url_ || Restrict downloads of sources to URLs starting with the given URL. For example, --only-sources=http://luarocks.org will allow LuaRocks to download sources only if the URL given in the rockspec starts with http://luarocks.org . | ||
19 | |- | ||
20 | | --tree=_tree_ || Which tree to operate on. | ||
21 | |- | ||
22 | | --local || Use the tree in the user's home directory. To enable it, see `[luarocks path](luarocks_path.md)` | ||
23 | |- | ||
24 | | --deps-mode=_mode_ || Select dependencies mode: | ||
25 | |||
26 | How to handle the list of rocks servers given in the rocks_servers array in the [config file](config_file_format.md). | ||
27 | |||
28 | * **one** - Consider only the tree at the top of the list (possibly, the one given by the --tree flag, overriding all entries from rocks_trees), ignore all others | ||
29 | * **all** - Consider all trees: if a dependency is installed in any tree of the rocks_trees list, we have a positive match. | ||
30 | * **order** - Consider only trees starting from the "current" one in the order, where the "current" is either: | ||
31 | * the one at the bottom of the rocks_trees list, | ||
32 | * or one explicitly given with --tree | ||
33 | * or the "home" tree if --local was given or local_by_default=true is configured (usually at the top of the list) | ||
34 | |- | ||
35 | | --verbose || Display verbose output of commands executed. | ||
36 | |- | ||
37 | | --timeout || Timeout on network operations, in seconds. 0 means no timeout (wait forever). Default is 30. | ||
38 | |} | ||
39 | |||
40 | # Supported commands | ||
41 | |||
42 | {| | ||
43 | | [build](luarocks_build.md) || Build/compile and install a rock. | ||
44 | |- | ||
45 | | [doc](luarocks_doc.md) || Shows documentation for an installed rock. | ||
46 | |- | ||
47 | | [download](luarocks_download.md)|| Download a specific rock or rockspec file from a rocks server. | ||
48 | |- | ||
49 | | [help](luarocks_help.md) || Help on commands. | ||
50 | |- | ||
51 | | [install](luarocks_install.md) || Install a rock. | ||
52 | |- | ||
53 | | [lint](luarocks_lint.md) || Check syntax of a rockspec. | ||
54 | |- | ||
55 | | [list](luarocks_list.md) || Lists currently installed rocks. | ||
56 | |- | ||
57 | | [config](luarocks_config.md) || Query and set the LuaRocks configuration. | ||
58 | |- | ||
59 | | [make](luarocks_make.md) || Compile package in current directory using a rockspec and install it. | ||
60 | |- | ||
61 | | [new_version](luarocks_new_version.md) || Auto-write a rockspec for a new version of a rock. | ||
62 | |- | ||
63 | | [pack](luarocks_pack.md) || Create a rock, packing sources or binaries. | ||
64 | |- | ||
65 | | [path](luarocks_path.md) || Return the currently configured package path. | ||
66 | |- | ||
67 | | [purge](luarocks_purge.md) || Remove all installed rocks from a tree. | ||
68 | |- | ||
69 | | [remove](luarocks_remove.md) || Uninstall a rock. | ||
70 | |- | ||
71 | | [search](luarocks_search.md) || Query the LuaRocks repositories. | ||
72 | |- | ||
73 | | [test](luarocks_test.md) || Run the test suite in the current directory. | ||
74 | |- | ||
75 | | [show](luarocks_show.md) || Shows information about an installed rock. | ||
76 | |- | ||
77 | | [unpack](luarocks_unpack.md) || Unpack the contents of a rock. | ||
78 | |- | ||
79 | | [upload](luarocks_upload.md) || Upload a rockspec to the public rocks repository. | ||
80 | |- | ||
81 | | [write_rockspec](luarocks_write_rockspec.md) || Write a template for a rockspec file. | ||
82 | |} | ||
83 | |||
84 | # Overview of the difference between "make", "build", "install" and "pack" | ||
85 | |||
86 | {| | ||
87 | | luarocks install modulename || downloads a binary .rock file and installs it to the local tree (falls back to "luarocks build modulename" behavior if a binary rock is not found) | ||
88 | |- | ||
89 | | luarocks build modulename || downloads a .src.rock or a rockspec and builds+installs it to the local tree. | ||
90 | |- | ||
91 | | luarocks build modulename-1.0-1.linux-x86.rock || extracts the rockspec from the rock and builds it as if the rockspec was passed in the command-line (i.e., redownloading sources and recompiling C modules if any). | ||
92 | |- | ||
93 | | luarocks build modulename-1.0-1.rockspec || builds+installs the rock using the given rockspec downloading the sources | ||
94 | |- | ||
95 | | luarocks make modulename-1.0-1.rockspec || builds+installs the rock using the rockspec using the contents of your current directory (kind of like the way make uses a Makefile) instead of downloading sources | ||
96 | |- | ||
97 | | luarocks pack modulename || grabs the rock from your local tree and packs it into a binary .rock file | ||
98 | |- | ||
99 | | luarocks pack modulename-1.0-1.rockspec || downloads the sources from the url and packs it into a .src.rock file | ||
100 | |} | ||
101 | |||
102 | |||