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-base
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-base
/install
47 $(call Package
/luci
/install/template
,$(1),modules
/base
)
48 $(PKG_BUILD_DIR
)/build
/mkversion.sh
$(1)/usr
/lib
/lua
/luci
/version.lua \
55 define Package
/luci-base
/config
58 default PACKAGE_luci-base_source
60 config PACKAGE_luci-base_compile
63 config PACKAGE_luci-base_stripped
66 config PACKAGE_luci-base_srcdiet
67 bool
"Compressed Source"
69 config PACKAGE_luci-base_source
75 define Package
/luci-base
/conffiles
79 ifneq ($(CONFIG_PACKAGE_luci-base_compile
),)
83 ifneq ($(CONFIG_PACKAGE_luci-base_stripped
),)
87 ifneq ($(CONFIG_PACKAGE_luci-base_srcdiet
),)
91 ifneq ($(CONFIG_PACKAGE_luci-base
),)
92 LUCI_SELECTED_MODULES
+=modules
/base
95 LUCI_BUILD_PACKAGES
+= luci-base
100 define Package
/luci-lib-
$(1)
103 TITLE
:=LuCI
- Lua Configuration Interface
104 URL
:=http
://luci.subsignal.org
/
105 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
106 SUBMENU
:=8. Libraries
107 TITLE
:=$(if
$(2),$(2),LuCI
$(1) library
)
108 $(if
$(3),DEPENDS
:=+luci-base
$(3))
111 define Package
/luci-lib-
$(1)/install
112 $(call Package
/luci
/install/template
,$$(1),libs
/$(1))
113 $(call Package
/luci-lib-
$(1)/extra-install
)
116 ifneq ($(CONFIG_PACKAGE_luci-lib-
$(1)),)
117 LUCI_SELECTED_MODULES
+=libs
/$(1)
120 LUCI_BUILD_PACKAGES
+= luci-lib-
$(1)
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-base
+luci-lib-nixio
))
162 $(eval
$(call library
,json
,LuCI JSON library
))
163 $(eval
$(call library
,nixio
,NIXIO POSIX library
,+PACKAGE_luci-lib-nixio_openssl
:libopenssl
+PACKAGE_luci-lib-nixio_cyassl
:libcyassl
))
164 $(eval
$(call library
,px5g
,RSA
/X
.509 Key Generator
(required for LuCId SSL support
),+luci-lib-nixio
))
165 $(eval
$(call library
,luaneightbl
,neightbl
- Lua lib for IPv6 neighbors
,+luci-base
))
170 define Package
/luci-proto-
$(1)
173 TITLE
:=LuCI
- Lua Configuration Interface
174 URL
:=http
://luci.subsignal.org
/
175 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
176 SUBMENU
:=6. Protocols
177 TITLE
:=$(if
$(2),$(2),LuCI
$(1) protocol support
)
181 define Package
/luci-proto-
$(1)/install
182 $(call Package
/luci
/install/template
,$$(1),protocols
/$(1))
185 ifneq ($(CONFIG_PACKAGE_luci-proto-
$(1)),)
186 LUCI_SELECTED_MODULES
+=protocols
/$(1)
189 LUCI_BUILD_PACKAGES
+= luci-proto-
$(1)
192 $(eval
$(call protocol
,ppp
,Support for PPP
/PPPoE
/PPPoA
/PPtP
))
193 $(eval
$(call protocol
,ipv6
,Support for DHCPv6
/6in4
/6to4
/6rd
/DS-Lite
))
194 $(eval
$(call protocol
,3g
,Support for
3G
,+PACKAGE_luci-proto-3g
:comgt
))
195 $(eval
$(call protocol
,relay
,Support for relayd pseudo bridges
,+PACKAGE_luci-proto-relay
:relayd
))
200 define Package
/luci-mod-
$(1)
203 TITLE
:=LuCI
- Lua Configuration Interface
204 URL
:=http
://luci.subsignal.org
/
205 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
207 TITLE
:=$(if
$(2),$(2),LuCI
$(1) module
)
208 $(if
$(3),DEPENDS
+=$(3))
211 define Package
/luci-mod-
$(1)/install
212 $(call Package
/luci
/install/template
,$$(1),modules
/$(1))
213 $(call Package
/luci-mod-
$(1)/extra-install
)
216 ifneq ($(CONFIG_PACKAGE_luci-mod-
$(1)),)
217 LUCI_SELECTED_MODULES
+=modules
/$(1)
220 LUCI_BUILD_PACKAGES
+= luci-mod-
$(1)
224 $(eval
$(call module
,admin-mini
,LuCI Essentials
- stripped down and user-friendly
,+luci-base @BROKEN
))
225 $(eval
$(call module
,admin-full
,LuCI Administration
- full-featured for full control
,+luci-base
))
226 $(eval
$(call module
,failsafe
,LuCI Fail-Safe
- Fail-Safe sysupgrade module
,+luci-base
))
227 $(eval
$(call module
,rpc
,LuCI RPC
- JSON-RPC API
,+luci-lib-json
))
232 define Package
/luci-app-
$(1)
235 TITLE
:=LuCI
- Lua Configuration Interface
236 URL
:=http
://luci.subsignal.org
/
237 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
238 SUBMENU
:=3. Applications
239 TITLE
:=$(if
$(2),$(2),LuCI
$(1) application
)
243 define Package
/luci-app-
$(1)/install
244 $(call Package
/luci
/install/template
,$$(1),applications
/luci-
$(1))
247 ifneq ($(CONFIG_PACKAGE_luci-app-
$(1)),)
248 LUCI_SELECTED_MODULES
+=applications
/luci-
$(1)
251 LUCI_BUILD_PACKAGES
+= luci-app-
$(1)
255 $(eval
$(call application
,firewall
,Firewall and Portforwarding application
,\
256 +PACKAGE_luci-app-firewall
:firewall
))
258 $(eval
$(call application
,qos
,Quality of Service configuration module
,\
259 +PACKAGE_luci-app-qos
:qos-scripts
))
261 $(eval
$(call application
,commands
,LuCI Shell Command Module
))
266 define Package
/luci-theme-
$(1)
269 TITLE
:=LuCI
- Lua Configuration Interface
270 URL
:=http
://luci.subsignal.org
/
272 TITLE
:=$(if
$(2),$(2),LuCI
$(1) theme
)
273 MAINTAINER
:=$(if
$(3),$(3),LuCI Development Team
<luci@lists.subsignal.org
>)
274 DEPENDS
:=+luci-base
$(4)
275 $(if
$(5),DEFAULT
:=PACKAGE_luci-base
)
278 define Package
/luci-theme-
$(1)/install
279 $(call Package
/luci
/install/template
,$$(1),themes
/$(1))
282 ifneq ($(CONFIG_PACKAGE_luci-theme-
$(1)),)
283 LUCI_SELECTED_MODULES
+=themes
/$(1)
286 LUCI_BUILD_PACKAGES
+= luci-theme-
$(1)
289 $(eval
$(call theme
,openwrt
,OpenWrt.org
))
290 $(eval
$(call theme
,bootstrap
,Bootstrap Theme
(default
),,,1))
295 define Package
/luci-i18n-
$(1)
298 TITLE
:=LuCI
- Lua Configuration Interface
299 URL
:=http
://luci.subsignal.org
/
300 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
301 SUBMENU
:=5. Translations
302 TITLE
:=$(if
$(2),$(2),$(1))
305 define Package
/luci-i18n-
$(1)/install
306 $(call Package
/luci
/install/template
,$$(1),i18n
/$(1))
309 ifneq ($(CONFIG_PACKAGE_luci-i18n-
$(1)),)
310 LUCI_SELECTED_MODULES
+=i18n
/$(1)
313 LUCI_BUILD_PACKAGES
+= luci-i18n-
$(1)
316 $(eval
$(call translation
,german
,German
))
317 $(eval
$(call translation
,english
,English
))
318 $(eval
$(call translation
,french
,French
(by Florian Fainelli
)))
319 $(eval
$(call translation
,italian
,Italian
(by Matteo Croce
)))
320 $(eval
$(call translation
,russian
,Russian
(by Skryabin Dmitry
)))
321 $(eval
$(call translation
,portuguese-brazilian
,Portuguese
(Brazilian
) (by Carlos Cesario
)))
322 $(eval
$(call translation
,chinese
,Chinese
(by Chinese Translators
)))
323 $(eval
$(call translation
,japanese
,Japanese
(by Tsukasa Hamano
)))
324 $(eval
$(call translation
,greek
,Greek
(by Vasilis Tsiligiannis
)))
325 $(eval
$(call translation
,catalan
,Catalan
(by Eduard Duran
)))
326 $(eval
$(call translation
,portuguese
,Portuguese
(by Jose Monteiro
)))
327 $(eval
$(call translation
,spanish
,Spanish
(by Guillermo Javier Nardoni
)))
328 $(eval
$(call translation
,vietnamese
,Vietnamese
(by Hong Phuc Dang
)))
329 $(eval
$(call translation
,malay
,Malay
(by Teow Wai Chet
)))
330 $(eval
$(call translation
,norwegian
,Norwegian
(by Lars Hardy
)))
331 $(eval
$(call translation
,hebrew
,Hebrew
))
332 $(eval
$(call translation
,romanian
,Romanian
))
333 $(eval
$(call translation
,ukrainian
,Ukrainian
))
334 $(eval
$(call translation
,hungarian
,Hungarian
))
335 $(eval
$(call translation
,polish
,Polish
))
340 define Package
/luci
$(if
$(1),-$(1))
343 TITLE
:=LuCI
- Lua Configuration Interface
344 URL
:=http
://luci.subsignal.org
/
345 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
346 SUBMENU
:=1. Collections
347 TITLE
:=$(if
$(2),$(2),LuCI
$(if
$(1),$(1),general
) collection
)
348 $(if
$(3),DEPENDS
:=$(3))
351 define Package
/luci
$(if
$(1),-$(1))/install
355 LUCI_BUILD_PACKAGES
+= luci
$(if
$(1),-$(1))
358 $(eval
$(call collection
,,\
359 Standard OpenWrt set including full admin with ppp support and the \
360 default OpenWrt theme
,\
361 +uhttpd
+uhttpd-mod-ubus
+luci-mod-admin-full
+luci-theme-bootstrap \
362 +luci-app-firewall
+luci-proto-ppp
+libiwinfo-lua
))
364 $(eval
$(call collection
,ssl
,\
365 Standard OpenWrt set with HTTPS support
,\
366 +luci
+libustream-polarssl
+px5g
))
368 $(eval
$(call collection
,light
,\
369 Minimum package set using only admin mini and the standard theme
,\
370 +uhttpd
+luci-mod-admin-mini
+luci-theme-openwrt @BROKEN
))
374 PKG_CONFIG_DEPENDS
=$(patsubst %,CONFIG_PACKAGE_
%,$(LUCI_BUILD_PACKAGES
))
376 include $(INCLUDE_DIR
)/package.mk
379 @if
[ ! -x
$(LUCI_TOPDIR
)/build
/mkrevision.sh
]; then \
380 echo
"*** Repository layout changed!" >&2; \
381 echo
"*** Please change the LuCI url in feeds.conf to http://svn.luci.subsignal.org/luci/trunk and reinstall the feed with" >&2; \
382 echo
"*** ./scripts/feeds update luci; ./scripts/feeds install -a -p luci" >&2; \
385 mkdir
-p
$(PKG_BUILD_DIR
)
386 $(TAR
) c
-C
$(LUCI_TOPDIR
) . \
387 --exclude
=.
pc --exclude
=.svn
--exclude
=.git \
388 --exclude
='*.o' --exclude
='*.so' \
390 tar x
-C
$(PKG_BUILD_DIR
)/
391 $(call Build
/Prepare
/Default
)
394 define Build
/Configure
398 MODULES
="$(LUCI_SELECTED_MODULES)" \
399 LUA_TARGET
="$(LUA_TARGET)" \
400 LUA_SHLIBS
="-llua -lm -ldl -lcrypt" \
401 CFLAGS
="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
402 LDFLAGS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
403 NIXIO_TLS
="$(NIXIO_TLS)" OS
="Linux"
406 $(foreach b
,$(LUCI_BUILD_PACKAGES
),$(eval
$(call BuildPackage
,$(b
))))