I'm trying to package LuaRocks, a deployment and management system for Lua modules, for OpenWRT, hoping to use it to enable porting some interesting projects from the Kepler project like the Sputnik wiki/CMS.
Thanks to the OpenWRT's incredibly versatile build system (thanks guys!) this doesn't seem to be very difficult at all. However, I do have a few questions about packaging in general and about packaging LuaRocks in particular.
First, when and when not to declare conffiles? LuaRocks uses /etc/luarocks/config.lua to store settings like where Lua rocks should be installed. This should be able to be changed by the user, so I've declared it as a conffile. But what happens when the packaged file contents change in newer versions? Debian apt has tools to assist in merging newer content, how about OpenWRT? Or should the user be prepared to simply force reinstall the package to pick up the changes?
Second, although there are some platform-independent, pure Lua rocks in the repository, many of them actually need to be 'made' (i.e. their non-Lua sources cross-compiled on the host) into binary or mixed rocks, in order to be installable on a target like OpenWRT.
How do I define this in my package Makefile? I think that I will need to use the STAGING_DIR and templates like Host/Build, but I've no experience yet with using them.
I will post my initial attempt at a package patch in a new ticket. Any help and suggestions will be much appreciated.