tagline: From openSUSE
Build Service Tutorial · Tips & Tricks · Cross Distribution Howto · Packaging checks
Desktop menu categories · RPM Macros · Scriptlets · Init scripts · How to write good changes
Packaging Lua for openSUSE
In order to provide better standards for lua related packages in openSUSE, the following guidelines have been discussed in the opensuse-packaging mailling list and this page reflects the outcome. If you would like to enhance this guideline please discuss your proposal at the above mentioned mailinglist before editing this page.
The main development should be taking place in devel:languages:lua and therefore devel:languages:misc should be dropped as the devel repo for Factory.
Unfortunately there are various lua packages that are scattered around the OBS and these should be developed in devel:languages:lua
NOTE Populating packages to devel project It was suggested this effort could be started by populating the packages (preferably as links to openSUSE:Factory, where they are already pushed). Any package that made it into devel:languages:lua should get a changedevelrequest to have the official devel repo follow the new package.
That means contacting the maintainers of such packages and ask for moving there package(s) to devel:languages:lua project
Guidelines for Lua packages
Macros are already defined by the lua and lua51 packages in devel:languages:lua
RPM macros for Lua
- The major.minor version of Lua
%lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2)
NOTE It was also suggested to compute this once at build time when installing the macros, rather then having rpm evaluate this macro every time. Please discuss ideas at the packaging mailling list
- compiled modules should go here
- pure Lua modules should go here
Lua add-on packages should generally follow the naming scheme of lua(version)-PKG_NAME -- e.g.
Currently main lua packages provided by openSUSE are as follows
- lua ------> providing version 5.2
- lua51 ------> providing version 5.1
- lua50 ------> providing version 5.0
lua51-luafilesystem -- tobe used with lua version 5.1
lua-luafilesystem -- tobe used with lua version 5.2
NOTE Unfortunately this itself brings the problem with the next version of lua coming into play say 5.3. Therefore a better way of naming the main lua packages is needed in order to prevent renaming process in the future
Development packages should have devel suffix added to the package name lua(version)-PKG_NAME-devel, e.g.: lua51-luafilesystem-devel
If a package has huge documentation or is just a doc package then naming should be lua(version)-PackageName-doc and should be installed to %_defaultdocdir
Many upstream Lua developers use LuaRocks to distribute their modules. Therefore we probably should be finding a way to integrate luarocks in our build system and possibly provide a packaging mechanism similar to py2pack of python