1 include $(TOPDIR
)/rules.mk
10 PKG_VERSION
:=$(shell $(LUCI_TOPDIR
)/build
/mkrevision.sh
2>/dev
/null || echo unknown
)
12 PKG_BUILD_DEPENDS
:=$(if
$(STAGING_DIR_ROOT
),lua
/host
)
13 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)
14 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
20 LUCI_SELECTED_MODULES
:=
22 ifeq ($(BOARD
),brcm-2.4
)
23 MAKE_FLAGS
+= CRAP
="1"
28 define Package
/luci
/install/template
29 $(CP
) -a
$(PKG_BUILD_DIR
)/$(2)/dist/* $(1)/ -R
30 $(CP
) -a
$(PKG_BUILD_DIR
)/$(2)/ipkg
/* $(1)/CONTROL
/ 2>/dev
/null || true
35 define Package
/luci-lib-core
38 TITLE
:=LuCI
- Lua Configuration Interface
39 URL
:=http
://luci.subsignal.org
/
40 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
42 DEPENDS
:=+lua
+libuci-lua
+libubus-lua
43 TITLE
:=LuCI core libraries
46 define Package
/luci-lib-core
/install
47 $(call Package
/luci
/install/template
,$(1),libs
/core
)
48 $(PKG_BUILD_DIR
)/build
/mkversion.sh
$(1)/usr
/lib
/lua
/luci
/version.lua \
55 define Package
/luci-lib-core
/config
58 default PACKAGE_luci-lib-core_source
60 config PACKAGE_luci-lib-core_compile
63 config PACKAGE_luci-lib-core_stripped
66 config PACKAGE_luci-lib-core_srcdiet
67 bool
"Compressed Source"
69 config PACKAGE_luci-lib-core_source
75 ifneq ($(CONFIG_PACKAGE_luci-lib-core_compile
),)
79 ifneq ($(CONFIG_PACKAGE_luci-lib-core_stripped
),)
83 ifneq ($(CONFIG_PACKAGE_luci-lib-core_srcdiet
),)
87 ifneq ($(CONFIG_PACKAGE_luci-lib-core
),)
88 LUCI_SELECTED_MODULES
+=libs
/core
91 LUCI_BUILD_PACKAGES
+= luci-lib-core
96 define Package
/luci-lib-
$(1)
99 TITLE
:=LuCI
- Lua Configuration Interface
100 URL
:=http
://luci.subsignal.org
/
101 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
102 SUBMENU
:=8. Libraries
103 TITLE
:=$(if
$(2),$(2),LuCI
$(1) library
)
104 $(if
$(3),DEPENDS
:=+luci-lib-core
$(3))
107 define Package
/luci-lib-
$(1)/install
108 $(call Package
/luci
/install/template
,$$(1),libs
/$(1))
109 $(call Package
/luci-lib-
$(1)/extra-install
)
112 ifneq ($(CONFIG_PACKAGE_luci-lib-
$(1)),)
113 LUCI_SELECTED_MODULES
+=libs
/$(1)
116 LUCI_BUILD_PACKAGES
+= luci-lib-
$(1)
119 define Package
/luci-lib-web
/conffiles
123 define Package
/luci-lib-nixio
/config
125 prompt
"TLS Provider"
126 default PACKAGE_luci-lib-nixio_notls
128 config PACKAGE_luci-lib-nixio_notls
131 config PACKAGE_luci-lib-nixio_axtls
132 bool
"Builtin (axTLS)"
134 config PACKAGE_luci-lib-nixio_cyassl
136 select PACKAGE_libcyassl
138 config PACKAGE_luci-lib-nixio_openssl
140 select PACKAGE_libopenssl
147 ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_axtls
),)
151 ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_openssl
),)
155 ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_cyassl
),)
157 LUCI_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/cyassl
161 $(eval
$(call library
,fastindex
,Fastindex indexing module
,+PACKAGE_luci-lib-fastindex
:liblua
))
162 $(eval
$(call library
,httpclient
,HTTP
(S
) client library
,+luci-lib-web
+luci-lib-nixio
))
163 $(eval
$(call library
,ipkg
,LuCI IPKG
/OPKG call abstraction library
))
164 $(eval
$(call library
,json
,LuCI JSON library
))
165 $(eval
$(call library
,lucid
,LuCId Full-Stack Webserver
,+luci-lib-nixio
+luci-lib-web
+luci-lib-px5g
))
166 $(eval
$(call library
,lucid-http
,LuCId HTTP Backend
,+luci-lib-lucid
))
167 $(eval
$(call library
,lucid-rpc
,LuCId RPC Backend
,+luci-lib-lucid
))
168 $(eval
$(call library
,nixio
,NIXIO POSIX library
,+PACKAGE_luci-lib-nixio_openssl
:libopenssl
+PACKAGE_luci-lib-nixio_cyassl
:libcyassl
))
169 $(eval
$(call library
,px5g
,RSA
/X
.509 Key Generator
(required for LuCId SSL support
),+luci-lib-nixio
))
170 $(eval
$(call library
,sys
,LuCI Linux
/POSIX system library
))
171 $(eval
$(call library
,web
,MVC Webframework
,+luci-lib-sys
+luci-lib-nixio
+luci-lib-core
+luci-sgi-cgi
))
172 $(eval
$(call library
,luaneightbl
,neightbl
- Lua lib for IPv6 neighbors
,+luci-lib-core
))
177 define Package
/luci-proto-
$(1)
180 TITLE
:=LuCI
- Lua Configuration Interface
181 URL
:=http
://luci.subsignal.org
/
182 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
183 SUBMENU
:=6. Protocols
184 TITLE
:=$(if
$(2),$(2),LuCI
$(1) protocol support
)
188 define Package
/luci-proto-
$(1)/install
189 $(call Package
/luci
/install/template
,$$(1),protocols
/$(1))
192 ifneq ($(CONFIG_PACKAGE_luci-proto-
$(1)),)
193 LUCI_SELECTED_MODULES
+=protocols
/$(1)
196 LUCI_BUILD_PACKAGES
+= luci-proto-
$(1)
199 $(eval
$(call protocol
,core
,Support for static
/dhcp
/none
))
200 $(eval
$(call protocol
,ppp
,Support for PPP
/PPPoE
/PPPoA
/PPtP
))
201 $(eval
$(call protocol
,ipv6
,Support for DHCPv6
/6in4
/6to4
/6rd
/DS-Lite
))
202 $(eval
$(call protocol
,3g
,Support for
3G
,+PACKAGE_luci-proto-3g
:comgt
))
203 $(eval
$(call protocol
,relay
,Support for relayd pseudo bridges
,+PACKAGE_luci-proto-relay
:relayd
))
208 define Package
/luci-mod-
$(1)
211 TITLE
:=LuCI
- Lua Configuration Interface
212 URL
:=http
://luci.subsignal.org
/
213 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
215 TITLE
:=$(if
$(2),$(2),LuCI
$(1) module
)
216 $(if
$(3),DEPENDS
+=$(3))
219 define Package
/luci-mod-
$(1)/install
220 $(call Package
/luci
/install/template
,$$(1),modules
/$(1))
221 $(call Package
/luci-mod-
$(1)/extra-install
)
224 ifneq ($(CONFIG_PACKAGE_luci-mod-
$(1)),)
225 LUCI_SELECTED_MODULES
+=modules
/$(1)
228 LUCI_BUILD_PACKAGES
+= luci-mod-
$(1)
232 define Package
/luci-mod-admin-core
/extra-install
233 touch
$(1)/etc
/init.d
/luci_fixtime || true
236 $(eval
$(call module
,admin-core
,Web UI Core module
,+luci-lib-web
+luci-proto-core
+luci-i18n-english
))
237 $(eval
$(call module
,admin-mini
,LuCI Essentials
- stripped down and user-friendly
,+luci-mod-admin-core @BROKEN
))
238 $(eval
$(call module
,admin-full
,LuCI Administration
- full-featured for full control
,+luci-mod-admin-core
+luci-lib-ipkg
))
239 $(eval
$(call module
,failsafe
,LuCI Fail-Safe
- Fail-Safe sysupgrade module
,+luci-mod-admin-core
))
240 $(eval
$(call module
,rpc
,LuCI RPC
- JSON-RPC API
,+luci-lib-json
))
241 $(eval
$(call module
,niu
,NIU
- Next Generation Interface
,+luci-mod-admin-core @BROKEN
))
246 define Package
/luci-app-
$(1)
249 TITLE
:=LuCI
- Lua Configuration Interface
250 URL
:=http
://luci.subsignal.org
/
251 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
252 SUBMENU
:=3. Applications
253 TITLE
:=$(if
$(2),$(2),LuCI
$(1) application
)
257 define Package
/luci-app-
$(1)/install
258 $(call Package
/luci
/install/template
,$$(1),applications
/luci-
$(1))
261 ifneq ($(CONFIG_PACKAGE_luci-app-
$(1)),)
262 LUCI_SELECTED_MODULES
+=applications
/luci-
$(1)
265 LUCI_BUILD_PACKAGES
+= luci-app-
$(1)
269 $(eval
$(call application
,firewall
,Firewall and Portforwarding application
,\
270 +PACKAGE_luci-app-firewall
:firewall
))
272 $(eval
$(call application
,qos
,Quality of Service configuration module
,\
273 +PACKAGE_luci-app-qos
:qos-scripts
))
275 $(eval
$(call application
,commands
,LuCI Shell Command Module
))
278 ### Server Gateway Interfaces ###
280 define Package
/luci-sgi-
$(1)
283 TITLE
:=LuCI
- Lua Configuration Interface
284 URL
:=http
://luci.subsignal.org
/
285 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
286 SUBMENU
:=7. Server Interfaces
287 TITLE
:=$(if
$(2),$(2),LuCI
$(1) server gateway interface
)
291 define Package
/luci-sgi-
$(1)/install
292 $(call Package
/luci
/install/template
,$$(1),libs
/sgi-
$(1))
295 ifneq ($(CONFIG_PACKAGE_luci-sgi-
$(1)),)
296 LUCI_SELECTED_MODULES
+=libs
/sgi-
$(1)
299 LUCI_BUILD_PACKAGES
+= luci-sgi-
$(1)
302 $(eval
$(call sgi
,cgi
,CGI Gateway behind existing Webserver
))
303 $(eval
$(call sgi
,uhttpd
,Binding for the uHTTPd server
,+uhttpd
+uhttpd-mod-lua
))
308 define Package
/luci-theme-
$(1)
311 TITLE
:=LuCI
- Lua Configuration Interface
312 URL
:=http
://luci.subsignal.org
/
314 TITLE
:=$(if
$(2),$(2),LuCI
$(1) theme
)
315 MAINTAINER
:=$(if
$(3),$(3),LuCI Development Team
<luci@lists.subsignal.org
>)
316 DEPENDS
:=$(if
$(filter-out base
,$(1)),+luci-theme-base
) $(4)
317 $(if
$(5),DEFAULT
:=PACKAGE_luci-lib-core
)
320 define Package
/luci-theme-
$(1)/install
321 $(call Package
/luci
/install/template
,$$(1),themes
/$(1))
324 ifneq ($(CONFIG_PACKAGE_luci-theme-
$(1)),)
325 LUCI_SELECTED_MODULES
+=themes
/$(1)
328 LUCI_BUILD_PACKAGES
+= luci-theme-
$(1)
331 $(eval
$(call theme
,base
,Common base for
all themes
))
332 $(eval
$(call theme
,openwrt
,OpenWrt.org
))
333 $(eval
$(call theme
,bootstrap
,Bootstrap Theme
(default
),,,1))
338 define Package
/luci-i18n-
$(1)
341 TITLE
:=LuCI
- Lua Configuration Interface
342 URL
:=http
://luci.subsignal.org
/
343 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
344 SUBMENU
:=5. Translations
345 TITLE
:=$(if
$(2),$(2),$(1))
348 define Package
/luci-i18n-
$(1)/install
349 $(call Package
/luci
/install/template
,$$(1),i18n
/$(1))
352 ifneq ($(CONFIG_PACKAGE_luci-i18n-
$(1)),)
353 LUCI_SELECTED_MODULES
+=i18n
/$(1)
356 LUCI_BUILD_PACKAGES
+= luci-i18n-
$(1)
359 $(eval
$(call translation
,german
,German
))
360 $(eval
$(call translation
,english
,English
))
361 $(eval
$(call translation
,french
,French
(by Florian Fainelli
)))
362 $(eval
$(call translation
,italian
,Italian
(by Matteo Croce
)))
363 $(eval
$(call translation
,russian
,Russian
(by Skryabin Dmitry
)))
364 $(eval
$(call translation
,portuguese-brazilian
,Portuguese
(Brazilian
) (by Carlos Cesario
)))
365 $(eval
$(call translation
,chinese
,Chinese
(by Chinese Translators
)))
366 $(eval
$(call translation
,japanese
,Japanese
(by Tsukasa Hamano
)))
367 $(eval
$(call translation
,greek
,Greek
(by Vasilis Tsiligiannis
)))
368 $(eval
$(call translation
,catalan
,Catalan
(by Eduard Duran
)))
369 $(eval
$(call translation
,portuguese
,Portuguese
(by Jose Monteiro
)))
370 $(eval
$(call translation
,spanish
,Spanish
(by Guillermo Javier Nardoni
)))
371 $(eval
$(call translation
,vietnamese
,Vietnamese
(by Hong Phuc Dang
)))
372 $(eval
$(call translation
,malay
,Malay
(by Teow Wai Chet
)))
373 $(eval
$(call translation
,norwegian
,Norwegian
(by Lars Hardy
)))
374 $(eval
$(call translation
,hebrew
,Hebrew
))
375 $(eval
$(call translation
,romanian
,Romanian
))
376 $(eval
$(call translation
,ukrainian
,Ukrainian
))
377 $(eval
$(call translation
,hungarian
,Hungarian
))
378 $(eval
$(call translation
,polish
,Polish
))
383 define Package
/luci
$(if
$(1),-$(1))
386 TITLE
:=LuCI
- Lua Configuration Interface
387 URL
:=http
://luci.subsignal.org
/
388 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
389 SUBMENU
:=1. Collections
390 TITLE
:=$(if
$(2),$(2),LuCI
$(if
$(1),$(1),general
) collection
)
391 $(if
$(3),DEPENDS
:=$(3))
394 define Package
/luci
$(if
$(1),-$(1))/install
398 LUCI_BUILD_PACKAGES
+= luci
$(if
$(1),-$(1))
401 $(eval
$(call collection
,,\
402 Standard OpenWrt set including full admin with ppp support and the \
403 default OpenWrt theme
,\
404 +uhttpd
+uhttpd-mod-ubus
+luci-mod-admin-full
+luci-theme-bootstrap \
405 +luci-app-firewall
+luci-proto-core
+luci-proto-ppp
+libiwinfo-lua
))
407 $(eval
$(call collection
,ssl
,\
408 Standard OpenWrt set with HTTPS support
,\
409 +luci
+libustream-polarssl
+px5g
))
411 $(eval
$(call collection
,light
,\
412 Minimum package set using only admin mini and the standard theme
,\
413 +uhttpd
+luci-mod-admin-mini
+luci-theme-openwrt @BROKEN
))
417 PKG_CONFIG_DEPENDS
=$(patsubst %,CONFIG_PACKAGE_
%,$(LUCI_BUILD_PACKAGES
))
419 include $(INCLUDE_DIR
)/package.mk
422 @if
[ ! -x
$(LUCI_TOPDIR
)/build
/mkrevision.sh
]; then \
423 echo
"*** Repository layout changed!" >&2; \
424 echo
"*** Please change the LuCI url in feeds.conf to http://svn.luci.subsignal.org/luci/trunk and reinstall the feed with" >&2; \
425 echo
"*** ./scripts/feeds update luci; ./scripts/feeds install -a -p luci" >&2; \
428 mkdir
-p
$(PKG_BUILD_DIR
)
429 $(TAR
) c
-C
$(LUCI_TOPDIR
) . \
430 --exclude
=.
pc --exclude
=.svn
--exclude
=.git \
431 --exclude
='boa-0*' --exclude
='*.o' --exclude
='*.so' \
433 tar x
-C
$(PKG_BUILD_DIR
)/
434 $(call Build
/Prepare
/Default
)
437 define Build
/Configure
441 MODULES
="$(LUCI_SELECTED_MODULES)" \
442 LUA_TARGET
="$(LUA_TARGET)" \
443 LUA_SHLIBS
="-llua -lm -ldl -lcrypt" \
444 CFLAGS
="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
445 LDFLAGS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
446 NIXIO_TLS
="$(NIXIO_TLS)" OS
="Linux"
449 $(foreach b
,$(LUCI_BUILD_PACKAGES
),$(eval
$(call BuildPackage
,$(b
))))