svn co http://svn.luci.subsignal.org/luci/trunk
Reference: LuCI Modules ?
The LuCI modules are divided into several category directories, namely:
* applications (Single applications or plugins for other modules or applications)
* i18n (Translation files)
* libs (Independent libraries)
* modules (Collections of applications)
* themes (Frontend themes)
Each module goes into a subdirectory of any of this category-directories.
Module directory ?
The contents of a module directory are as follows:
This is the module’s makefile. If the module just contains Lua sourcecode or resources then the following Makefile should suffice.
If you have C(++) code in your module your Makefile should at least contain the following things.
# Commands to compile and link your C-code
# and to install them under the dist/ hierarchy
# Commands to clean your compiled objects
The src directory is reserved for C sourcecode.
luasrc contains all Lua sourcecode files. These will automatically be stripped or compiled depending on the Make target and are
installed in the LuCI installation directory.
lua is equivalent to luasrc but containing Lua files will be installed in the Lua document root.
All files under htdocs will be copied to the document root of the target webserver.
All directories and files under root will be copied to the installation target as they are.
dist is reserved for the builder to create a working installation tree that will represent the filesystem on the target machine. DO NOT
put any files there as they will get deleted.
ipkg contains IPKG package control files, like preinst, posinst, prerm, postrm. conffiles. See IPKG documentation for details.
OpenWRT feed integration ?
If you want to add your module to the LuCI OpenWRT feed you have to add several sections to the contrib/package/luci/Makefile.
For a Web UI applications this is:
A package description:
TITLE:=SHORT DESCRIPTION OF YOURMODULE
A package installation target:
A module build instruction:
A build package call:
$(eval $(call BuildPackage,luci-app-YOURMODULE))
depends on libpcap