lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Sep 4, 2009 at 8:37 AM, Rob Kendrick wrote:
> I think I'd be happier if what LuaRocks was was a system for converting
> a description of a Lua module into a package; so RPM, DEB, tar.gz,
> Windows MSI, etc.

The LuaDist [1-2] project is creating CMake build files
(CMakeLists.txt) + rockspec-like files (dist.info) for many modules
(>100 so far).  The CMakeLists.txt files can used in LuaDist,
LuaRocks, or standalone in CMake.  Now, CMake has a "cpack" [3-4]
utility that can transform those into packages (RPM, DEB, tar.gz,
etc., though not currently MSI).  Just add this to a CMakeLists.txt
file before building:

  SET(CPACK_GENERATOR "DEB")
  SET(CPACK_PACKAGE_CONTACT "me")
  SET(CPACK_PACKAGE_MAINTAINER "me")
  ..... and add any other CPACK variables derived from the dist.info.
   .... It may be better if luadist passed them as variables to cmake
  INCLUDE(CPack)

As an initial test, I generated luabitop .deb, .tar.gz, and .rpm
packages now just by running cpack directly in the LuaDist
"tmp/luabitop-1.0.0.build.cmake" folder (with cleanup=false in
config.lua).  In practice, this would need much more study, such as
[5-6] concerns.

[1] http://luadist.org
[2] http://lua-users.org/wiki/LuaDist
[3] http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
[4] http://www.cmake.org/Wiki/CMake:CPackPackageGenerators
[5] http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-February/022774.html
[6] http://lists.kde.org/?l=kde-buildsystem&m=122065459413486&w=2