PackagingDrafts/Lua

Naming
(This section should eventually be linked from Packaging:NamingGuidelines)

Lua add-on packages generally follow the naming scheme of  -- e.g. ,  ,. If the module name makes it clear that it is an add-on for Lua, though, the module name itself is sufficient. e.g..

Use your judgement -- e.g. the second  in   already stands for Lua, but it might not be seen as unambiguous enough.

Macros
Define the following on top of your spec file:

%global luaver 5.1 %global lualibdir %{_libdir}/lua/%{luaver} %global luapkgdir %{_datadir}/lua/%{luaver}
 * 1) for compiled modules
 * 1) for arch-independent modules

From Fedora 16 and onwards (not RHEL 6!), the main  package virtually provides , so packages targeting this release and above can declare this runtime dependency:

Requires: lua(abi) = %{luaver}

to target older releases (or RHEL 6), use the following instead. It's less safe (in that RPM will not complain if you install this package on a system with a higher Lua ABI version) but in practice our supported releases currently ship with Lua 5.1.x.

Requires: lua >= %{luaver}

Rocks
Upstream Lua developers increasingly use LuaRocks to distribute their modules. We are exploring providing better integration with LuaRocks in the future -- both in generating spec files from  specifications, and in shipping a   package that can pick up existing RPM-installed Lua packages, but for the time being, you can use upstream rockspec specifications to guide your packaging work.