luci笔记3,luci源码包结构

Categories

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:

Makefile

This is the module's makefile. If the module just contains Lua sourcecode or resources then the following Makefile should suffice.

include ../../build/config.mk
include ../../build/module.mk

If you have C(++) code in your module your Makefile should at least contain the following things.

include ../../build/config.mk
include ../../build/gccconfig.mk
include ../../build/module.mk

compile:
    # Commands to compile and link your C-code
    # and to install them under the dist/ hierarchy

clean: luaclean
    # Commands to clean your compiled objects

src

The src directory is reserved for C sourcecode.

luasrc

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

lua is equivalent to luasrc but containing Lua files will be installed in the Lua document root.

htdocs

All files under htdocs will be copied to the document root of the target webserver.

root

All directories and files under root will be copied to the installation target as they are.

dist

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

ipkg contains IPKG package control files, like preinstposinstprermpostrmconffiles. See IPKG documentation for details.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值