Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reference: LuCI Modules
The LuCI modules are divided into several category directories, namely:
- applications (Single applications or plugins for other modules or applications)
- libs (Independent libraries)
- modules (Collections of applications)
- themes (Frontend themes)
Each module goes into a subdirectory of any of this category-directories.
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.
include $(TOPDIR)/rules.mk LUCI_TITLE:=Title of my example applications LUCI_DEPENDS:=+some-package +libsome-library +luci-app-anotherthing include ../../luci.mk # call BuildPackage - OpenWrt buildroot signature
If you have C(++) code in your module you should include a
src/ subdirectory containing another Makefile supporting a
compile and an
install target. The
install target should deploy its files relative to the predefined
$(DESTDIR) variable, e.g.
mkdir -p $(DESTDIR)/usr/bin; cp myexecutable $(DESTDIR)/usr/bin/myexecutable
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. The directory corresponds to
/usr/lib/lua/luci/ on the target.
lua is equivalent to
luasrc but containing Lua files will be installed in the Lua document root, which corresponds to
/usr/lib/lua/ on the target system.
All files under
htdocs will be copied to the document root of the target webserver, usually
All directories and files under
root will be copied to the installation target as they are, means relative to the targets root directory.
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.