What is the proper Rockspec filename for a new lua

2019-05-26 03:28发布

问题:

According to this page: http://luarocks.org/en/Creating_a_rock

This should be saved in a file called luafruits-1.0-1.rockspec. The name must contain lowercase versions of the "package" and "version" fields, or else LuaRocks will complain.

However, other luarocks are using rockspec as the filename. Where can I get more information on rockspec vs name-VER-REV.rockspec? Luarocks itself uses a rockspec filename: https://github.com/keplerproject/luarocks/blob/master/rockspec

回答1:

A rockspec filename is version-agnostic, but can be used only with the luarocks make command (hence, it's useful for development/bootstrapping). For redistributing a rockspec (for example, sending for inclusion in http://luarocks.org), use the versioned name. Some devs also keep a rockspecs/ dir in their repo containing the rockspecs for their releases: users can then use those files directly if they wish so, by using commands such as luarocks install https://raw.github.com/lua4web/refser/v0.2/rockspecs/refser-0.2-1.rockspec (using the raw.github.com pathname).



标签: lua luarocks