build: introduce luci-base
Merges libs/core, libs/ipkg, libs/web, libs/sys, libs/sgi-cgi, libs/sgi-uhttpd, modules/admin-core, themes/base and protcols/core into modules/base and renames luci-lib-core to luci-base.
4
Makefile
|
@ -14,7 +14,7 @@ all: build
|
|||
build: gccbuild luabuild
|
||||
|
||||
gccbuild:
|
||||
make -C libs/web CC="cc" CFLAGS="" LDFLAGS="" SDK="$(shell test -f .running-sdk && echo 1)" host-install
|
||||
make -C modules/base CC="cc" CFLAGS="" LDFLAGS="" SDK="$(shell test -f .running-sdk && echo 1)" host-install
|
||||
for i in $(MODULES); do \
|
||||
make -C$$i SDK="$(shell test -f .running-sdk && echo 1)" compile || { \
|
||||
echo "*** Compilation of $$i failed!"; \
|
||||
|
@ -33,7 +33,7 @@ i18nbuild:
|
|||
clean:
|
||||
rm -f .running-sdk
|
||||
rm -rf docs
|
||||
make -C libs/web host-clean
|
||||
make -C modules/base host-clean
|
||||
for i in $(MODULES); do make -C$$i clean; done
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ define Package/luci-mod-freifunk-community
|
|||
TITLE:=Freifunk Community Meta-Package
|
||||
DEPENDS+=$(call add_deps,mod-freifunk-community, \
|
||||
iptables-mod-nat-extra iptables-mod-ipopt \
|
||||
luci-lib-web luci-app-splash luci-i18n-german \
|
||||
luci-app-splash luci-i18n-german \
|
||||
olsrd olsrd-mod-dyn-gw-plain \
|
||||
olsrd-mod-jsoninfo olsrd-mod-nameservice \
|
||||
olsrd-mod-watchdog kmod-tun \
|
||||
|
@ -224,8 +224,7 @@ define theme
|
|||
SUBMENU:=4. Themes
|
||||
TITLE:=$(if $(2),$(2),LuCI $(1) theme)
|
||||
MAINTAINER:=$(if $(3),$(3),LuCI Development Team <luci@lists.subsignal.org>)
|
||||
DEPENDS:=$(if $(filter-out base,$(1)),+luci-theme-base) $(4)
|
||||
$(if $(5),DEFAULT:=PACKAGE_luci-lib-core)
|
||||
DEPENDS:=+luci-base $(4)
|
||||
endef
|
||||
|
||||
define Package/luci-theme-$(1)/install
|
||||
|
|
|
@ -32,7 +32,7 @@ endef
|
|||
|
||||
|
||||
### Core package ###
|
||||
define Package/luci-lib-core
|
||||
define Package/luci-base
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
TITLE:=LuCI - Lua Configuration Interface
|
||||
|
@ -43,8 +43,8 @@ define Package/luci-lib-core
|
|||
TITLE:=LuCI core libraries
|
||||
endef
|
||||
|
||||
define Package/luci-lib-core/install
|
||||
$(call Package/luci/install/template,$(1),libs/core)
|
||||
define Package/luci-base/install
|
||||
$(call Package/luci/install/template,$(1),modules/base)
|
||||
$(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
|
||||
"OpenWrt Firmware" \
|
||||
"$(OPENWRTVERSION)" \
|
||||
|
@ -52,43 +52,47 @@ define Package/luci-lib-core/install
|
|||
"$(PKG_VERSION)"
|
||||
endef
|
||||
|
||||
define Package/luci-lib-core/config
|
||||
define Package/luci-base/config
|
||||
choice
|
||||
prompt "Build Target"
|
||||
default PACKAGE_luci-lib-core_source
|
||||
default PACKAGE_luci-base_source
|
||||
|
||||
config PACKAGE_luci-lib-core_compile
|
||||
config PACKAGE_luci-base_compile
|
||||
bool "Precompiled"
|
||||
|
||||
config PACKAGE_luci-lib-core_stripped
|
||||
config PACKAGE_luci-base_stripped
|
||||
bool "Stripped"
|
||||
|
||||
config PACKAGE_luci-lib-core_srcdiet
|
||||
config PACKAGE_luci-base_srcdiet
|
||||
bool "Compressed Source"
|
||||
|
||||
config PACKAGE_luci-lib-core_source
|
||||
config PACKAGE_luci-base_source
|
||||
bool "Full Source"
|
||||
|
||||
endchoice
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-lib-core_compile),)
|
||||
define Package/luci-base/conffiles
|
||||
/etc/config/luci
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-base_compile),)
|
||||
LUA_TARGET:=compile
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-lib-core_stripped),)
|
||||
ifneq ($(CONFIG_PACKAGE_luci-base_stripped),)
|
||||
LUA_TARGET:=strip
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-lib-core_srcdiet),)
|
||||
ifneq ($(CONFIG_PACKAGE_luci-base_srcdiet),)
|
||||
LUA_TARGET:=diet
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-lib-core),)
|
||||
LUCI_SELECTED_MODULES+=libs/core
|
||||
ifneq ($(CONFIG_PACKAGE_luci-base),)
|
||||
LUCI_SELECTED_MODULES+=modules/base
|
||||
endif
|
||||
|
||||
LUCI_BUILD_PACKAGES += luci-lib-core
|
||||
LUCI_BUILD_PACKAGES += luci-base
|
||||
|
||||
|
||||
### Libraries ###
|
||||
|
@ -101,7 +105,7 @@ define library
|
|||
MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
|
||||
SUBMENU:=8. Libraries
|
||||
TITLE:=$(if $(2),$(2),LuCI $(1) library)
|
||||
$(if $(3),DEPENDS:=+luci-lib-core $(3))
|
||||
$(if $(3),DEPENDS:=+luci-base $(3))
|
||||
endef
|
||||
|
||||
define Package/luci-lib-$(1)/install
|
||||
|
@ -116,10 +120,6 @@ define library
|
|||
LUCI_BUILD_PACKAGES += luci-lib-$(1)
|
||||
endef
|
||||
|
||||
define Package/luci-lib-web/conffiles
|
||||
/etc/config/luci
|
||||
endef
|
||||
|
||||
define Package/luci-lib-nixio/config
|
||||
choice
|
||||
prompt "TLS Provider"
|
||||
|
@ -158,14 +158,11 @@ ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_cyassl),)
|
|||
endif
|
||||
|
||||
|
||||
$(eval $(call library,httpclient,HTTP(S) client library,+luci-lib-web +luci-lib-nixio))
|
||||
$(eval $(call library,ipkg,LuCI IPKG/OPKG call abstraction library))
|
||||
$(eval $(call library,httpclient,HTTP(S) client library,+luci-base +luci-lib-nixio))
|
||||
$(eval $(call library,json,LuCI JSON library))
|
||||
$(eval $(call library,nixio,NIXIO POSIX library,+PACKAGE_luci-lib-nixio_openssl:libopenssl +PACKAGE_luci-lib-nixio_cyassl:libcyassl))
|
||||
$(eval $(call library,px5g,RSA/X.509 Key Generator (required for LuCId SSL support),+luci-lib-nixio))
|
||||
$(eval $(call library,sys,LuCI Linux/POSIX system library))
|
||||
$(eval $(call library,web,MVC Webframework,+luci-lib-sys +luci-lib-nixio +luci-lib-core +luci-sgi-cgi))
|
||||
$(eval $(call library,luaneightbl,neightbl - Lua lib for IPv6 neighbors,+luci-lib-core))
|
||||
$(eval $(call library,luaneightbl,neightbl - Lua lib for IPv6 neighbors,+luci-base))
|
||||
|
||||
|
||||
### Protocols ###
|
||||
|
@ -192,7 +189,6 @@ define protocol
|
|||
LUCI_BUILD_PACKAGES += luci-proto-$(1)
|
||||
endef
|
||||
|
||||
$(eval $(call protocol,core,Support for static/dhcp/none))
|
||||
$(eval $(call protocol,ppp,Support for PPP/PPPoE/PPPoA/PPtP))
|
||||
$(eval $(call protocol,ipv6,Support for DHCPv6/6in4/6to4/6rd/DS-Lite))
|
||||
$(eval $(call protocol,3g,Support for 3G,+PACKAGE_luci-proto-3g:comgt))
|
||||
|
@ -225,14 +221,9 @@ define module
|
|||
endef
|
||||
|
||||
|
||||
define Package/luci-mod-admin-core/extra-install
|
||||
touch $(1)/etc/init.d/luci_fixtime || true
|
||||
endef
|
||||
|
||||
$(eval $(call module,admin-core,Web UI Core module,+luci-lib-web +luci-proto-core +luci-i18n-english))
|
||||
$(eval $(call module,admin-mini,LuCI Essentials - stripped down and user-friendly,+luci-mod-admin-core @BROKEN))
|
||||
$(eval $(call module,admin-full,LuCI Administration - full-featured for full control,+luci-mod-admin-core +luci-lib-ipkg))
|
||||
$(eval $(call module,failsafe,LuCI Fail-Safe - Fail-Safe sysupgrade module,+luci-mod-admin-core))
|
||||
$(eval $(call module,admin-mini,LuCI Essentials - stripped down and user-friendly,+luci-base @BROKEN))
|
||||
$(eval $(call module,admin-full,LuCI Administration - full-featured for full control,+luci-base))
|
||||
$(eval $(call module,failsafe,LuCI Fail-Safe - Fail-Safe sysupgrade module,+luci-base))
|
||||
$(eval $(call module,rpc,LuCI RPC - JSON-RPC API,+luci-lib-json))
|
||||
|
||||
|
||||
|
@ -270,34 +261,6 @@ $(eval $(call application,qos,Quality of Service configuration module,\
|
|||
$(eval $(call application,commands,LuCI Shell Command Module))
|
||||
|
||||
|
||||
### Server Gateway Interfaces ###
|
||||
define sgi
|
||||
define Package/luci-sgi-$(1)
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
TITLE:=LuCI - Lua Configuration Interface
|
||||
URL:=http://luci.subsignal.org/
|
||||
MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
|
||||
SUBMENU:=7. Server Interfaces
|
||||
TITLE:=$(if $(2),$(2),LuCI $(1) server gateway interface)
|
||||
DEPENDS:=$(3)
|
||||
endef
|
||||
|
||||
define Package/luci-sgi-$(1)/install
|
||||
$(call Package/luci/install/template,$$(1),libs/sgi-$(1))
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-sgi-$(1)),)
|
||||
LUCI_SELECTED_MODULES+=libs/sgi-$(1)
|
||||
endif
|
||||
|
||||
LUCI_BUILD_PACKAGES += luci-sgi-$(1)
|
||||
endef
|
||||
|
||||
$(eval $(call sgi,cgi,CGI Gateway behind existing Webserver))
|
||||
$(eval $(call sgi,uhttpd,Binding for the uHTTPd server,+uhttpd +uhttpd-mod-lua))
|
||||
|
||||
|
||||
### Themes ###
|
||||
define theme
|
||||
define Package/luci-theme-$(1)
|
||||
|
@ -308,8 +271,8 @@ define theme
|
|||
SUBMENU:=4. Themes
|
||||
TITLE:=$(if $(2),$(2),LuCI $(1) theme)
|
||||
MAINTAINER:=$(if $(3),$(3),LuCI Development Team <luci@lists.subsignal.org>)
|
||||
DEPENDS:=$(if $(filter-out base,$(1)),+luci-theme-base) $(4)
|
||||
$(if $(5),DEFAULT:=PACKAGE_luci-lib-core)
|
||||
DEPENDS:=+luci-base $(4)
|
||||
$(if $(5),DEFAULT:=PACKAGE_luci-base)
|
||||
endef
|
||||
|
||||
define Package/luci-theme-$(1)/install
|
||||
|
@ -323,7 +286,6 @@ define theme
|
|||
LUCI_BUILD_PACKAGES += luci-theme-$(1)
|
||||
endef
|
||||
|
||||
$(eval $(call theme,base,Common base for all themes))
|
||||
$(eval $(call theme,openwrt,OpenWrt.org))
|
||||
$(eval $(call theme,bootstrap,Bootstrap Theme (default),,,1))
|
||||
|
||||
|
@ -397,7 +359,7 @@ $(eval $(call collection,,\
|
|||
Standard OpenWrt set including full admin with ppp support and the \
|
||||
default OpenWrt theme,\
|
||||
+uhttpd +uhttpd-mod-ubus +luci-mod-admin-full +luci-theme-bootstrap \
|
||||
+luci-app-firewall +luci-proto-core +luci-proto-ppp +libiwinfo-lua))
|
||||
+luci-app-firewall +luci-proto-ppp +libiwinfo-lua))
|
||||
|
||||
$(eval $(call collection,ssl,\
|
||||
Standard OpenWrt set with HTTPS support,\
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
|
@ -1,2 +0,0 @@
|
|||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
|
@ -1,2 +0,0 @@
|
|||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
|
@ -1,2 +0,0 @@
|
|||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
|
@ -1,2 +0,0 @@
|
|||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
|
@ -1,2 +0,0 @@
|
|||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ -n "${IPKG_INSTROOT}" ] || {
|
||||
/etc/init.d/luci_fixtime enabled || /etc/init.d/luci_fixtime enable
|
||||
/etc/init.d/luci_dhcp_migrate enabled || /etc/init.d/luci_dhcp_migrate enable
|
||||
exit 0
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=59
|
||||
|
||||
boot() {
|
||||
if [ -f /etc/config/luci_ethers ]; then
|
||||
logger -t luci_dhcp_migrate "Migrating luci_ethers configuration ..."
|
||||
|
||||
lua -lluci.model.uci -e '
|
||||
x=luci.model.uci.cursor()
|
||||
x:foreach("luci_ethers", "static_lease",
|
||||
function(s)
|
||||
x:section("dhcp", "host", nil, {mac=s.macaddr, ip=s.ipaddr})
|
||||
end)
|
||||
x:save("dhcp")
|
||||
x:commit("dhcp")
|
||||
'
|
||||
|
||||
rm -f /etc/config/luci_ethers
|
||||
fi
|
||||
|
||||
if [ -f /etc/config/luci_hosts ]; then
|
||||
logger -t luci_dhcp_migrate "Migrating luci_hosts configuration ..."
|
||||
|
||||
lua -lluci.model.uci -e '
|
||||
x=luci.model.uci.cursor()
|
||||
x:foreach("luci_hosts", "host",
|
||||
function(s)
|
||||
x:section("dhcp", "domain", nil, {name=s.hostname, ip=s.ipaddr})
|
||||
end)
|
||||
x:save("dhcp")
|
||||
x:commit("dhcp")
|
||||
'
|
||||
|
||||
rm -f /etc/config/luci_hosts
|
||||
fi
|
||||
}
|
||||
|
||||
start() { :; }
|
||||
stop() { :; }
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=05
|
||||
STOP=95
|
||||
|
||||
start() {
|
||||
cat <<' EOF' | lua -l luci.fs -l luci.util -
|
||||
if (os.time() < 1000000000) then
|
||||
os.execute('date -s ' .. os.date('%Y%m%d%H%M', luci.fs.mtime("/etc/init.d/luci_fixtime")))
|
||||
end
|
||||
EOF
|
||||
}
|
||||
|
||||
stop() {
|
||||
[[ -w /etc/init.d/luci_fixtime ]] && cat /dev/null >> /etc/init.d/luci_fixtime && touch /etc/init.d/luci_fixtime
|
||||
}
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 135 B After Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 838 B After Width: | Height: | Size: 838 B |
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 517 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 814 B After Width: | Height: | Size: 814 B |
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 982 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 485 B |
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 980 B |