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
,httpclient
,HTTP
(S
) client library
,+luci-lib-web
+luci-lib-nixio
))
162 $(eval
$(call library
,ipkg
,LuCI IPKG
/OPKG call abstraction library
))
163 $(eval
$(call library
,json
,LuCI JSON library
))
164 $(eval
$(call library
,nixio
,NIXIO POSIX library
,+PACKAGE_luci-lib-nixio_openssl
:libopenssl
+PACKAGE_luci-lib-nixio_cyassl
:libcyassl
))
165 $(eval
$(call library
,px5g
,RSA
/X
.509 Key Generator
(required for LuCId SSL support
),+luci-lib-nixio
))
166 $(eval
$(call library
,sys
,LuCI Linux
/POSIX system library
))
167 $(eval
$(call library
,web
,MVC Webframework
,+luci-lib-sys
+luci-lib-nixio
+luci-lib-core
+luci-sgi-cgi
))
168 $(eval
$(call library
,luaneightbl
,neightbl
- Lua lib for IPv6 neighbors
,+luci-lib-core
))
173 define Package
/luci-proto-
$(1)
176 TITLE
:=LuCI
- Lua Configuration Interface
177 URL
:=http
://luci.subsignal.org
/
178 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
179 SUBMENU
:=6. Protocols
180 TITLE
:=$(if
$(2),$(2),LuCI
$(1) protocol support
)
184 define Package
/luci-proto-
$(1)/install
185 $(call Package
/luci
/install/template
,$$(1),protocols
/$(1))
188 ifneq ($(CONFIG_PACKAGE_luci-proto-
$(1)),)
189 LUCI_SELECTED_MODULES
+=protocols
/$(1)
192 LUCI_BUILD_PACKAGES
+= luci-proto-
$(1)
195 $(eval
$(call protocol
,core
,Support for static
/dhcp
/none
))
196 $(eval
$(call protocol
,ppp
,Support for PPP
/PPPoE
/PPPoA
/PPtP
))
197 $(eval
$(call protocol
,ipv6
,Support for DHCPv6
/6in4
/6to4
/6rd
/DS-Lite
))
198 $(eval
$(call protocol
,3g
,Support for
3G
,+PACKAGE_luci-proto-3g
:comgt
))
199 $(eval
$(call protocol
,relay
,Support for relayd pseudo bridges
,+PACKAGE_luci-proto-relay
:relayd
))
204 define Package
/luci-mod-
$(1)
207 TITLE
:=LuCI
- Lua Configuration Interface
208 URL
:=http
://luci.subsignal.org
/
209 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
211 TITLE
:=$(if
$(2),$(2),LuCI
$(1) module
)
212 $(if
$(3),DEPENDS
+=$(3))
215 define Package
/luci-mod-
$(1)/install
216 $(call Package
/luci
/install/template
,$$(1),modules
/$(1))
217 $(call Package
/luci-mod-
$(1)/extra-install
)
220 ifneq ($(CONFIG_PACKAGE_luci-mod-
$(1)),)
221 LUCI_SELECTED_MODULES
+=modules
/$(1)
224 LUCI_BUILD_PACKAGES
+= luci-mod-
$(1)
228 define Package
/luci-mod-admin-core
/extra-install
229 touch
$(1)/etc
/init.d
/luci_fixtime || true
232 $(eval
$(call module
,admin-core
,Web UI Core module
,+luci-lib-web
+luci-proto-core
+luci-i18n-english
))
233 $(eval
$(call module
,admin-mini
,LuCI Essentials
- stripped down and user-friendly
,+luci-mod-admin-core @BROKEN
))
234 $(eval
$(call module
,admin-full
,LuCI Administration
- full-featured for full control
,+luci-mod-admin-core
+luci-lib-ipkg
))
235 $(eval
$(call module
,failsafe
,LuCI Fail-Safe
- Fail-Safe sysupgrade module
,+luci-mod-admin-core
))
236 $(eval
$(call module
,rpc
,LuCI RPC
- JSON-RPC API
,+luci-lib-json
))
241 define Package
/luci-app-
$(1)
244 TITLE
:=LuCI
- Lua Configuration Interface
245 URL
:=http
://luci.subsignal.org
/
246 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
247 SUBMENU
:=3. Applications
248 TITLE
:=$(if
$(2),$(2),LuCI
$(1) application
)
252 define Package
/luci-app-
$(1)/install
253 $(call Package
/luci
/install/template
,$$(1),applications
/luci-
$(1))
256 ifneq ($(CONFIG_PACKAGE_luci-app-
$(1)),)
257 LUCI_SELECTED_MODULES
+=applications
/luci-
$(1)
260 LUCI_BUILD_PACKAGES
+= luci-app-
$(1)
264 $(eval
$(call application
,firewall
,Firewall and Portforwarding application
,\
265 +PACKAGE_luci-app-firewall
:firewall
))
267 $(eval
$(call application
,qos
,Quality of Service configuration module
,\
268 +PACKAGE_luci-app-qos
:qos-scripts
))
270 $(eval
$(call application
,commands
,LuCI Shell Command Module
))
273 ### Server Gateway Interfaces ###
275 define Package
/luci-sgi-
$(1)
278 TITLE
:=LuCI
- Lua Configuration Interface
279 URL
:=http
://luci.subsignal.org
/
280 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
281 SUBMENU
:=7. Server Interfaces
282 TITLE
:=$(if
$(2),$(2),LuCI
$(1) server gateway interface
)
286 define Package
/luci-sgi-
$(1)/install
287 $(call Package
/luci
/install/template
,$$(1),libs
/sgi-
$(1))
290 ifneq ($(CONFIG_PACKAGE_luci-sgi-
$(1)),)
291 LUCI_SELECTED_MODULES
+=libs
/sgi-
$(1)
294 LUCI_BUILD_PACKAGES
+= luci-sgi-
$(1)
297 $(eval
$(call sgi
,cgi
,CGI Gateway behind existing Webserver
))
298 $(eval
$(call sgi
,uhttpd
,Binding for the uHTTPd server
,+uhttpd
+uhttpd-mod-lua
))
303 define Package
/luci-theme-
$(1)
306 TITLE
:=LuCI
- Lua Configuration Interface
307 URL
:=http
://luci.subsignal.org
/
309 TITLE
:=$(if
$(2),$(2),LuCI
$(1) theme
)
310 MAINTAINER
:=$(if
$(3),$(3),LuCI Development Team
<luci@lists.subsignal.org
>)
311 DEPENDS
:=$(if
$(filter-out base
,$(1)),+luci-theme-base
) $(4)
312 $(if
$(5),DEFAULT
:=PACKAGE_luci-lib-core
)
315 define Package
/luci-theme-
$(1)/install
316 $(call Package
/luci
/install/template
,$$(1),themes
/$(1))
319 ifneq ($(CONFIG_PACKAGE_luci-theme-
$(1)),)
320 LUCI_SELECTED_MODULES
+=themes
/$(1)
323 LUCI_BUILD_PACKAGES
+= luci-theme-
$(1)
326 $(eval
$(call theme
,base
,Common base for
all themes
))
327 $(eval
$(call theme
,openwrt
,OpenWrt.org
))
328 $(eval
$(call theme
,bootstrap
,Bootstrap Theme
(default
),,,1))
333 define Package
/luci-i18n-
$(1)
336 TITLE
:=LuCI
- Lua Configuration Interface
337 URL
:=http
://luci.subsignal.org
/
338 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
339 SUBMENU
:=5. Translations
340 TITLE
:=$(if
$(2),$(2),$(1))
343 define Package
/luci-i18n-
$(1)/install
344 $(call Package
/luci
/install/template
,$$(1),i18n
/$(1))
347 ifneq ($(CONFIG_PACKAGE_luci-i18n-
$(1)),)
348 LUCI_SELECTED_MODULES
+=i18n
/$(1)
351 LUCI_BUILD_PACKAGES
+= luci-i18n-
$(1)
354 $(eval
$(call translation
,german
,German
))
355 $(eval
$(call translation
,english
,English
))
356 $(eval
$(call translation
,french
,French
(by Florian Fainelli
)))
357 $(eval
$(call translation
,italian
,Italian
(by Matteo Croce
)))
358 $(eval
$(call translation
,russian
,Russian
(by Skryabin Dmitry
)))
359 $(eval
$(call translation
,portuguese-brazilian
,Portuguese
(Brazilian
) (by Carlos Cesario
)))
360 $(eval
$(call translation
,chinese
,Chinese
(by Chinese Translators
)))
361 $(eval
$(call translation
,japanese
,Japanese
(by Tsukasa Hamano
)))
362 $(eval
$(call translation
,greek
,Greek
(by Vasilis Tsiligiannis
)))
363 $(eval
$(call translation
,catalan
,Catalan
(by Eduard Duran
)))
364 $(eval
$(call translation
,portuguese
,Portuguese
(by Jose Monteiro
)))
365 $(eval
$(call translation
,spanish
,Spanish
(by Guillermo Javier Nardoni
)))
366 $(eval
$(call translation
,vietnamese
,Vietnamese
(by Hong Phuc Dang
)))
367 $(eval
$(call translation
,malay
,Malay
(by Teow Wai Chet
)))
368 $(eval
$(call translation
,norwegian
,Norwegian
(by Lars Hardy
)))
369 $(eval
$(call translation
,hebrew
,Hebrew
))
370 $(eval
$(call translation
,romanian
,Romanian
))
371 $(eval
$(call translation
,ukrainian
,Ukrainian
))
372 $(eval
$(call translation
,hungarian
,Hungarian
))
373 $(eval
$(call translation
,polish
,Polish
))
378 define Package
/luci
$(if
$(1),-$(1))
381 TITLE
:=LuCI
- Lua Configuration Interface
382 URL
:=http
://luci.subsignal.org
/
383 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
384 SUBMENU
:=1. Collections
385 TITLE
:=$(if
$(2),$(2),LuCI
$(if
$(1),$(1),general
) collection
)
386 $(if
$(3),DEPENDS
:=$(3))
389 define Package
/luci
$(if
$(1),-$(1))/install
393 LUCI_BUILD_PACKAGES
+= luci
$(if
$(1),-$(1))
396 $(eval
$(call collection
,,\
397 Standard OpenWrt set including full admin with ppp support and the \
398 default OpenWrt theme
,\
399 +uhttpd
+uhttpd-mod-ubus
+luci-mod-admin-full
+luci-theme-bootstrap \
400 +luci-app-firewall
+luci-proto-core
+luci-proto-ppp
+libiwinfo-lua
))
402 $(eval
$(call collection
,ssl
,\
403 Standard OpenWrt set with HTTPS support
,\
404 +luci
+libustream-polarssl
+px5g
))
406 $(eval
$(call collection
,light
,\
407 Minimum package set using only admin mini and the standard theme
,\
408 +uhttpd
+luci-mod-admin-mini
+luci-theme-openwrt @BROKEN
))
412 PKG_CONFIG_DEPENDS
=$(patsubst %,CONFIG_PACKAGE_
%,$(LUCI_BUILD_PACKAGES
))
414 include $(INCLUDE_DIR
)/package.mk
417 @if
[ ! -x
$(LUCI_TOPDIR
)/build
/mkrevision.sh
]; then \
418 echo
"*** Repository layout changed!" >&2; \
419 echo
"*** Please change the LuCI url in feeds.conf to http://svn.luci.subsignal.org/luci/trunk and reinstall the feed with" >&2; \
420 echo
"*** ./scripts/feeds update luci; ./scripts/feeds install -a -p luci" >&2; \
423 mkdir
-p
$(PKG_BUILD_DIR
)
424 $(TAR
) c
-C
$(LUCI_TOPDIR
) . \
425 --exclude
=.
pc --exclude
=.svn
--exclude
=.git \
426 --exclude
='boa-0*' --exclude
='*.o' --exclude
='*.so' \
428 tar x
-C
$(PKG_BUILD_DIR
)/
429 $(call Build
/Prepare
/Default
)
432 define Build
/Configure
436 MODULES
="$(LUCI_SELECTED_MODULES)" \
437 LUA_TARGET
="$(LUA_TARGET)" \
438 LUA_SHLIBS
="-llua -lm -ldl -lcrypt" \
439 CFLAGS
="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
440 LDFLAGS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
441 NIXIO_TLS
="$(NIXIO_TLS)" OS
="Linux"
444 $(foreach b
,$(LUCI_BUILD_PACKAGES
),$(eval
$(call BuildPackage
,$(b
))))