PKG_VERSION:=$(shell $(LUCI_TOPDIR)/build/mkrevision.sh 2>/dev/null || echo unknown)
-PKG_BUILD_DEPENDS:=$(if $(STAGING_DIR_ROOT),lua/host)
+PKG_BUILD_DEPENDS:=$(if $(STAGING_DIR_ROOT),lua/host) iwinfo
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
PKG_USE_MIPS16:=0
LUCI_BUILD_PACKAGES:=
LUCI_SELECTED_MODULES:=
+ifeq ($(BOARD),brcm-2.4)
+ MAKE_FLAGS += CRAP="1"
+endif
+
### Templates ###
define Package/luci/install/template
### Core package ###
-define Package/luci-lib-core
+define Package/luci-base
SECTION:=luci
CATEGORY:=LuCI
TITLE:=LuCI - Lua Configuration Interface
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)" \
"$(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 ###
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
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"
endif
-$(eval $(call library,fastindex,Fastindex indexing module,+PACKAGE_luci-lib-fastindex:liblua))
-$(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,lucid,LuCId Full-Stack Webserver,+luci-lib-nixio +luci-lib-web +luci-lib-px5g))
-$(eval $(call library,lucid-http,LuCId HTTP Backend,+luci-lib-lucid))
-$(eval $(call library,lucid-rpc,LuCId RPC Backend,+luci-lib-lucid))
$(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 ###
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))
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))
-$(eval $(call module,niu,NIU - Next Generation Interface,+luci-mod-admin-core @BROKEN))
### Applications ###
$(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)
URL:=http://luci.subsignal.org/
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)
+ MAINTAINER:=$(if $(3),$(3),LuCI Development Team <luci@lists.subsignal.org>)
endef
define Package/luci-theme-$(1)/install
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))
-
-$(eval $(call theme,freifunk-bno,Freifunk Berlin Nordost Theme,\
- Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>))
+$(eval $(call theme,bootstrap,Bootstrap Theme (default)))
-$(eval $(call theme,freifunk-generic,Freifunk Generic Theme,\
- Manuel Munz <freifunk-at-somakoma-dot-de>))
### Translations ###
define translation
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 +luci-lib-nixio))
$(eval $(call collection,ssl,\
Standard OpenWrt set with HTTPS support,\
- +luci +libustream-cyassl +px5g))
+ +luci +libustream-polarssl +px5g))
$(eval $(call collection,light,\
Minimum package set using only admin mini and the standard theme,\
mkdir -p $(PKG_BUILD_DIR)
$(TAR) c -C $(LUCI_TOPDIR) . \
--exclude=.pc --exclude=.svn --exclude=.git \
- --exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
+ --exclude='*.o' --exclude='*.so' \
--exclude=dist | \
tar x -C $(PKG_BUILD_DIR)/
$(call Build/Prepare/Default)