86ffce7690b9d3f89403e71ec945b0c60210a3b5
[project/luci.git] / contrib / package / luci / Makefile
1 include $(TOPDIR)/rules.mk
2
3 LUCI_TOPDIR=../../..
4
5 PKG_NAME:=luci
6 PKG_RELEASE:=1
7
8 PKG_BUILD_PARALLEL:=0
9
10 PKG_VERSION:=$(shell $(LUCI_TOPDIR)/build/mkrevision.sh 2>/dev/null || echo unknown)
11
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
15
16 LUA_TARGET:=source
17 LUCI_CFLAGS:=
18 LUCI_BUILD_PACKAGES:=
19 LUCI_SELECTED_MODULES:=
20
21 ifeq ($(BOARD),brcm-2.4)
22   MAKE_FLAGS += CRAP="1"
23 endif
24
25
26 ### Templates ###
27 define Package/luci/install/template
28         $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
29         $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
30 endef
31
32
33 ### Core package ###
34 define Package/luci-lib-core
35   SECTION:=luci
36   CATEGORY:=LuCI
37   TITLE:=LuCI - Lua Configuration Interface
38   URL:=http://luci.subsignal.org/
39   MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
40   SUBMENU:=8. Libraries
41   DEPENDS:=+lua +libuci-lua +libubus-lua
42   TITLE:=LuCI core libraries
43 endef
44
45 define Package/luci-lib-core/install
46         $(call Package/luci/install/template,$(1),libs/core)
47         $(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
48                 "OpenWrt Firmware" \
49                 "$(OPENWRTVERSION)" \
50                 "trunk" \
51                 "$(PKG_VERSION)"
52 endef
53
54 define Package/luci-lib-core/config
55        choice
56                prompt "Build Target"
57                default PACKAGE_luci-lib-core_source
58
59        config PACKAGE_luci-lib-core_compile
60                bool "Precompiled"
61
62        config PACKAGE_luci-lib-core_stripped
63                bool "Stripped"
64
65        config PACKAGE_luci-lib-core_srcdiet
66                bool "Compressed Source"
67
68        config PACKAGE_luci-lib-core_source
69                bool "Full Source"
70
71        endchoice
72 endef
73
74 ifneq ($(CONFIG_PACKAGE_luci-lib-core_compile),)
75   LUA_TARGET:=compile
76 endif
77
78 ifneq ($(CONFIG_PACKAGE_luci-lib-core_stripped),)
79   LUA_TARGET:=strip
80 endif
81
82 ifneq ($(CONFIG_PACKAGE_luci-lib-core_srcdiet),)
83   LUA_TARGET:=diet
84 endif
85
86 ifneq ($(CONFIG_PACKAGE_luci-lib-core),)
87   LUCI_SELECTED_MODULES+=libs/core
88 endif
89
90 LUCI_BUILD_PACKAGES += luci-lib-core
91
92
93 ### Libraries ###
94 define library
95   define Package/luci-lib-$(1)
96     SECTION:=luci
97     CATEGORY:=LuCI
98     TITLE:=LuCI - Lua Configuration Interface
99     URL:=http://luci.subsignal.org/
100     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
101     SUBMENU:=8. Libraries
102     TITLE:=$(if $(2),$(2),LuCI $(1) library)
103     $(if $(3),DEPENDS:=+luci-lib-core $(3))
104   endef
105
106   define Package/luci-lib-$(1)/install
107         $(call Package/luci/install/template,$$(1),libs/$(1))
108         $(call Package/luci-lib-$(1)/extra-install)
109   endef
110
111   ifneq ($(CONFIG_PACKAGE_luci-lib-$(1)),)
112     LUCI_SELECTED_MODULES+=libs/$(1)
113   endif
114
115   LUCI_BUILD_PACKAGES += luci-lib-$(1)
116 endef
117
118 define Package/luci-lib-web/conffiles
119 /etc/config/luci
120 endef
121
122 define Package/luci-lib-nixio/config
123         choice
124                 prompt "TLS Provider"
125                 default PACKAGE_luci-lib-nixio_notls
126
127                 config PACKAGE_luci-lib-nixio_notls
128                         bool "Disabled"
129
130                 config PACKAGE_luci-lib-nixio_axtls
131                         bool "Builtin (axTLS)"
132
133                 config PACKAGE_luci-lib-nixio_cyassl
134                         bool "CyaSSL"
135                         select PACKAGE_libcyassl
136
137                 config PACKAGE_luci-lib-nixio_openssl
138                         bool "OpenSSL"
139                         select PACKAGE_libopenssl
140         endchoice
141 endef
142
143
144 NIXIO_TLS:=
145
146 ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_axtls),)
147   NIXIO_TLS:=axtls
148 endif
149
150 ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_openssl),)
151   NIXIO_TLS:=openssl
152 endif
153
154 ifneq ($(CONFIG_PACKAGE_luci-lib-nixio_cyassl),)
155   NIXIO_TLS:=cyassl
156   LUCI_CFLAGS+=-I$(STAGING_DIR)/usr/include/cyassl
157 endif
158
159
160 $(eval $(call library,fastindex,Fastindex indexing module,+PACKAGE_luci-lib-fastindex:liblua))
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,lucid,LuCId Full-Stack Webserver,+luci-lib-nixio +luci-lib-web +luci-lib-px5g))
165 $(eval $(call library,lucid-http,LuCId HTTP Backend,+luci-lib-lucid))
166 $(eval $(call library,lucid-rpc,LuCId RPC Backend,+luci-lib-lucid))
167 $(eval $(call library,nixio,NIXIO POSIX library,+PACKAGE_luci-lib-nixio_openssl:libopenssl +PACKAGE_luci-lib-nixio_cyassl:libcyassl))
168 $(eval $(call library,px5g,RSA/X.509 Key Generator (required for LuCId SSL support),+luci-lib-nixio))
169 $(eval $(call library,sys,LuCI Linux/POSIX system library))
170 $(eval $(call library,web,MVC Webframework,+luci-lib-sys +luci-lib-nixio +luci-lib-core +luci-sgi-cgi))
171
172
173 ### Protocols ###
174 define protocol
175   define Package/luci-proto-$(1)
176     SECTION:=luci
177     CATEGORY:=LuCI
178     TITLE:=LuCI - Lua Configuration Interface
179     URL:=http://luci.subsignal.org/
180     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
181     SUBMENU:=6. Protocols
182     TITLE:=$(if $(2),$(2),LuCI $(1) protocol support)
183     DEPENDS:=$(3)
184   endef
185
186   define Package/luci-proto-$(1)/install
187         $(call Package/luci/install/template,$$(1),protocols/$(1))
188   endef
189
190   ifneq ($(CONFIG_PACKAGE_luci-proto-$(1)),)
191     LUCI_SELECTED_MODULES+=protocols/$(1)
192   endif
193
194   LUCI_BUILD_PACKAGES += luci-proto-$(1)
195 endef
196
197 $(eval $(call protocol,core,Support for static/dhcp/none))
198 $(eval $(call protocol,ppp,Support for PPP/PPPoE/PPPoA/PPtP))
199 $(eval $(call protocol,ipv6,Support for DHCPv6/6in4/6to4/6rd,+PACKAGE_luci-proto-ipv6:6in4 +PACKAGE_luci-proto-ipv6:6to4 +PACKAGE_luci-proto-ipv6:6rd +PACKAGE_luci-proto-ipv6:odhcp6c))
200 $(eval $(call protocol,3g,Support for 3G,+PACKAGE_luci-proto-3g:comgt))
201 $(eval $(call protocol,relay,Support for relayd pseudo bridges,+PACKAGE_luci-proto-relay:relayd))
202
203
204 ### Community Packages ###
205 define Package/luci-mod-freifunk-community
206   SECTION:=luci
207   CATEGORY:=LuCI
208   TITLE:=LuCI - Lua Configuration Interface
209   URL:=http://luci.subsignal.org/
210   MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
211   SUBMENU:=9. Freifunk
212   TITLE:=Freifunk Community Meta-Package
213   DEPENDS+= \
214    +luci-lib-web +luci-app-splash +luci-i18n-german \
215    +PACKAGE_luci-mod-freifunk-community:olsrd +PACKAGE_luci-mod-freifunk-community:olsrd-mod-dyn-gw-plain \
216    +PACKAGE_luci-mod-freifunk-community:olsrd-mod-txtinfo +PACKAGE_luci-mod-freifunk-community:olsrd-mod-nameservice \
217    +PACKAGE_luci-mod-freifunk-community:olsrd-mod-watchdog +PACKAGE_luci-mod-freifunk-community:kmod-tun \
218    +PACKAGE_luci-mod-freifunk-community:ip +PACKAGE_luci-mod-freifunk-community:freifunk-watchdog +luci-app-olsr \
219    +luci-app-olsr-services +freifunk-gwcheck +freifunk-mapupdate
220 endef
221
222 define Package/luci-mod-freifunk-community/install
223         $(call Package/luci/install/template,$(1),applications/freifunk-community)
224 endef
225
226 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk-community),)
227         LUCI_SELECTED_MODULES+=applications/freifunk-community
228 endif
229
230 LUCI_BUILD_PACKAGES += luci-mod-freifunk-community
231
232
233 ### Modules ###
234 define module
235   define Package/luci-mod-$(1)
236     SECTION:=luci
237     CATEGORY:=LuCI
238     TITLE:=LuCI - Lua Configuration Interface
239     URL:=http://luci.subsignal.org/
240     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
241     SUBMENU:=2. Modules
242     TITLE:=$(if $(2),$(2),LuCI $(1) module)
243     $(if $(3),DEPENDS+=$(3))
244   endef
245
246   define Package/luci-mod-$(1)/install
247         $(call Package/luci/install/template,$$(1),modules/$(1))
248         $(call Package/luci-mod-$(1)/extra-install)
249   endef
250
251   ifneq ($(CONFIG_PACKAGE_luci-mod-$(1)),)
252     LUCI_SELECTED_MODULES+=modules/$(1)
253   endif
254
255   LUCI_BUILD_PACKAGES += luci-mod-$(1)
256 endef
257
258
259 define Package/luci-mod-admin-core/extra-install
260         touch $(1)/etc/init.d/luci_fixtime || true
261 endef
262
263 $(eval $(call module,admin-core,Web UI Core module,+luci-lib-web +luci-proto-core +luci-i18n-english))
264 $(eval $(call module,admin-mini,LuCI Essentials - stripped down and user-friendly,+luci-mod-admin-core @BROKEN))
265 $(eval $(call module,admin-full,LuCI Administration - full-featured for full control,+luci-mod-admin-core +luci-lib-ipkg))
266 $(eval $(call module,failsafe,LuCI Fail-Safe - Fail-Safe sysupgrade module,+luci-mod-admin-core))
267 $(eval $(call module,rpc,LuCI RPC - JSON-RPC API,+luci-lib-json))
268 $(eval $(call module,freifunk,LuCI Freifunk module,+luci-mod-admin-full +luci-lib-json +PACKAGE_luci-mod-freifunk:freifunk-firewall +freifunk-common))
269 $(eval $(call module,niu,NIU - Next Generation Interface,+luci-mod-admin-core @BROKEN))
270
271
272 ### Applications ###
273 define application
274   define Package/luci-app-$(1)
275     SECTION:=luci
276     CATEGORY:=LuCI
277     TITLE:=LuCI - Lua Configuration Interface
278     URL:=http://luci.subsignal.org/
279     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
280     SUBMENU:=3. Applications
281     TITLE:=$(if $(2),$(2),LuCI $(1) application)
282         DEPENDS:=$(3)
283   endef
284
285   define Package/luci-app-$(1)/install
286         $(call Package/luci/install/template,$$(1),applications/luci-$(1))
287   endef
288
289   ifneq ($(CONFIG_PACKAGE_luci-app-$(1)),)
290     LUCI_SELECTED_MODULES+=applications/luci-$(1)
291   endif
292
293   LUCI_BUILD_PACKAGES += luci-app-$(1)
294 endef
295
296 define Package/luci-app-splash/conffiles
297 /etc/config/luci_splash
298 /usr/lib/luci-splash/splashtext.html
299 endef
300
301 define Package/luci-app-statistics/conffiles
302 /etc/config/luci_statistics
303 endef
304
305 define Package/luci-app-diag-devinfo/conffiles
306 /etc/config/luci_devinfo
307 endef
308
309
310 $(eval $(call application,siitwizard,SIIT IPv4-over-IPv6 configuration wizard,\
311         +PACKAGE_luci-app-siitwizard:kmod-siit))
312
313 $(eval $(call application,firewall,Firewall and Portforwarding application,\
314         +PACKAGE_luci-app-firewall:firewall3))
315
316 $(eval $(call application,freifunk-policyrouting,Policy routing for mesh traffic,\
317         +PACKAGE_luci-app-freifunk-policyrouting:freifunk-policyrouting))
318
319 $(eval $(call application,freifunk-widgets,Widgets for the Freifunk index page,\
320         +PACKAGE_luci-app-freifunk-widgets:luci-mod-freifunk))
321
322 $(eval $(call application,meshwizard, Shellscript based wizard to setup mesh networks,\
323         +PACKAGE_luci-app-freifunk-meshwizard:meshwizard))
324
325 $(eval $(call application,olsr,OLSR configuration and status module,\
326         +olsrd +olsrd-mod-jsoninfo))
327
328 $(eval $(call application,olsr-viz,OLSR Visualisation,\
329         luci-app-olsr +olsrd-mod-txtinfo))
330
331 $(eval $(call application,freifunk-diagnostics,Tools for network diagnosis like traceroute and ping))
332
333 $(eval $(call application,olsr-services,Show services announced with the nameservice plugin,\
334         luci-app-olsr +olsrd-mod-nameservice))
335
336 $(eval $(call application,qos,Quality of Service configuration module,\
337         +PACKAGE_luci-app-qos:qos-scripts))
338
339 $(eval $(call application,splash,Freifunk DHCP-Splash application,\
340         +luci-lib-nixio +tc +kmod-sched +iptables-mod-nat-extra +iptables-mod-ipopt))
341
342 $(eval $(call application,statistics,LuCI Statistics Application,\
343         +PACKAGE_luci-app-statistics:collectd \
344         +PACKAGE_luci-app-statistics:rrdtool1 \
345         +PACKAGE_luci-app-statistics:collectd-mod-rrdtool \
346         +PACKAGE_luci-app-statistics:collectd-mod-iwinfo \
347         +PACKAGE_luci-app-statistics:collectd-mod-interface \
348         +PACKAGE_luci-app-statistics:collectd-mod-load)) \
349         +PACKAGE_luci-app-statistics:collectd-mod-network))
350
351
352 $(eval $(call application,diag-core,LuCI Diagnostics Tools (Core)))
353
354 $(eval $(call application,diag-devinfo,LuCI Diagnostics Tools (Device Info),\
355         +luci-app-diag-core \
356         +PACKAGE_luci-app-diag-devinfo:smap \
357         +PACKAGE_luci-app-diag-devinfo:netdiscover \
358         +PACKAGE_luci-app-diag-devinfo:mac-to-devinfo \
359         +PACKAGE_luci-app-diag-devinfo:httping \
360         +PACKAGE_luci-app-diag-devinfo:smap-to-devinfo \
361         +PACKAGE_luci-app-diag-devinfo:netdiscover-to-devinfo))
362
363 $(eval $(call application,voice-core,LuCI Voice Software (Core)))
364
365 $(eval $(call application,voice-diag,LuCI Voice Software (Diagnostics),\
366         luci-app-diag-devinfo))
367
368 $(eval $(call application,commands,LuCI Shell Command Module))
369
370 $(eval $(call application,upnp,Universal Plug & Play configuration module,\
371         +PACKAGE_luci-app-upnp:miniupnpd))
372
373 $(eval $(call application,ntpc,NTP time synchronisation configuration module,\
374         +PACKAGE_luci-app-ntpc:ntpclient))
375
376 $(eval $(call application,ddns,Dynamic DNS configuration module,\
377         +PACKAGE_luci-app-ddns:ddns-scripts))
378
379 $(eval $(call application,samba,Network Shares - Samba SMB/CIFS module,\
380         +PACKAGE_luci-app-samba:samba36-server))
381
382 $(eval $(call application,mmc-over-gpio,MMC-over-GPIO configuration module,\
383         +PACKAGE_luci-app-mmc-over-gpio:kmod-mmc-over-gpio))
384
385 $(eval $(call application,p910nd,p910nd - Printer server module,\
386         +PACKAGE_luci-app-p910nd:p910nd))
387
388 $(eval $(call application,ushare,uShare - UPnP A/V & DLNA Media Server,\
389         +PACKAGE_luci-app-ushare:ushare))
390
391 $(eval $(call application,hd-idle,Hard Disk Idle Spin-Down module,\
392         +PACKAGE_luci-app-hd-idle:hd-idle))
393
394 $(eval $(call application,tinyproxy,Tinyproxy - HTTP(S)-Proxy configuration,\
395         +PACKAGE_luci-app-tinyproxy:tinyproxy))
396
397 $(eval $(call application,polipo,LuCI Support for the Polipo Proxy,\
398         +PACKAGE_luci-app-polipo:polipo))
399
400 $(eval $(call application,openvpn,LuCI Support for OpenVPN,\
401         +PACKAGE_luci-app-openvpn:openvpn @BROKEN))
402
403 $(eval $(call application,p2pblock,LuCI Support for the Freifunk P2P-Block addon,\
404         luci-app-firewall +PACKAGE_luci-app-p2pblock:freifunk-p2pblock))
405
406 $(eval $(call application,multiwan,LuCI Support for the OpenWrt MultiWAN agent,\
407         luci-app-firewall +PACKAGE_luci-app-multiwan:multiwan))
408
409 $(eval $(call application,wol,LuCI Support for Wake-on-LAN,\
410         +PACKAGE_luci-app-wol:etherwake))
411
412 $(eval $(call application,vnstat,LuCI Support for VnStat,\
413         +PACKAGE_luci-app-vnstat:vnstat \
414     +PACKAGE_luci-app-vnstat:vnstati))
415
416 $(eval $(call application,radvd,LuCI Support for Radvd,\
417         +PACKAGE_luci-app-radvd:radvd))
418
419 $(eval $(call application,ahcp,LuCI Support for AHCPd,\
420         +PACKAGE_luci-app-ahcp:ahcpd))
421
422 $(eval $(call application,wshaper,LuCI Support for wshaper,\
423         +PACKAGE_luci-app-wshaper:wshaper))
424
425 $(eval $(call application,pbx,LuCI PBX Administration,\
426         +PACKAGE_luci-app-pbx:asterisk18 \
427         +PACKAGE_luci-app-pbx:asterisk18-app-authenticate \
428         +PACKAGE_luci-app-pbx:asterisk18-app-disa \
429         +PACKAGE_luci-app-pbx:asterisk18-app-setcallerid \
430         +PACKAGE_luci-app-pbx:asterisk18-app-system \
431         +PACKAGE_luci-app-pbx:asterisk18-chan-gtalk \
432         +PACKAGE_luci-app-pbx:asterisk18-codec-a-mu \
433         +PACKAGE_luci-app-pbx:asterisk18-codec-alaw \
434         +PACKAGE_luci-app-pbx:asterisk18-func-cut \
435         +PACKAGE_luci-app-pbx:asterisk18-res-clioriginate \
436         +PACKAGE_luci-app-pbx:asterisk18-func-channel \
437         +PACKAGE_luci-app-pbx:asterisk18-chan-local \
438         +PACKAGE_luci-app-pbx:asterisk18-app-record \
439         +PACKAGE_luci-app-pbx:asterisk18-app-senddtmf \
440         +PACKAGE_luci-app-pbx:asterisk18-res-crypto))
441
442 $(eval $(call application,pbx-voicemail,LuCI PBX Administration Voicemail Support,\
443         luci-app-pbx +PACKAGE_luci-app-pbx-voicemail:msmtp \
444         +PACKAGE_luci-app-pbx-voicemail:coreutils-base64))
445
446 $(eval $(call application,ltqtapi,Lantiq voip))
447
448 $(eval $(call application,minidlna,LuCI Support for miniDLNA,\
449         +PACKAGE_luci-app-minidlna:minidlna))
450
451 $(eval $(call application,transmission,LuCI Support for Transmission,\
452         +PACKAGE_luci-app-transmission:transmission-daemon))
453
454 $(eval $(call application,watchcat,LuCI Support for Watchcat,\
455         +PACKAGE_luci-app-watchcat:watchcat))
456
457 ### Server Gateway Interfaces ###
458 define sgi
459   define Package/luci-sgi-$(1)
460     SECTION:=luci
461     CATEGORY:=LuCI
462     TITLE:=LuCI - Lua Configuration Interface
463     URL:=http://luci.subsignal.org/
464     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
465     SUBMENU:=7. Server Interfaces
466     TITLE:=$(if $(2),$(2),LuCI $(1) server gateway interface)
467         DEPENDS:=$(3)
468   endef
469
470   define Package/luci-sgi-$(1)/install
471         $(call Package/luci/install/template,$$(1),libs/sgi-$(1))
472   endef
473
474   ifneq ($(CONFIG_PACKAGE_luci-sgi-$(1)),)
475     LUCI_SELECTED_MODULES+=libs/sgi-$(1)
476   endif
477
478   LUCI_BUILD_PACKAGES += luci-sgi-$(1)
479 endef
480
481 $(eval $(call sgi,cgi,CGI Gateway behind existing Webserver))
482 $(eval $(call sgi,uhttpd,Binding for the uHTTPd server,+uhttpd +uhttpd-mod-lua))
483
484
485 ### Themes ###
486 define theme
487   define Package/luci-theme-$(1)
488     SECTION:=luci
489     CATEGORY:=LuCI
490     TITLE:=LuCI - Lua Configuration Interface
491     URL:=http://luci.subsignal.org/
492     SUBMENU:=4. Themes
493     TITLE:=$(if $(2),$(2),LuCI $(1) theme)
494         MAINTAINER:=$(if $(3),$(3),LuCI Development Team <luci@lists.subsignal.org>)
495         DEPENDS:=$(if $(filter-out base,$(1)),+luci-theme-base) $(4)
496         $(if $(5),DEFAULT:=PACKAGE_luci-lib-core)
497   endef
498
499   define Package/luci-theme-$(1)/install
500         $(call Package/luci/install/template,$$(1),themes/$(1))
501   endef
502
503   ifneq ($(CONFIG_PACKAGE_luci-theme-$(1)),)
504     LUCI_SELECTED_MODULES+=themes/$(1)
505   endif
506
507   LUCI_BUILD_PACKAGES += luci-theme-$(1)
508 endef
509
510 $(eval $(call theme,base,Common base for all themes))
511 $(eval $(call theme,openwrt,OpenWrt.org))
512 $(eval $(call theme,bootstrap,Bootstrap Theme (default),,,1))
513
514 $(eval $(call theme,freifunk-bno,Freifunk Berlin Nordost Theme,\
515         Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>))
516
517 $(eval $(call theme,freifunk-generic,Freifunk Generic Theme,\
518         Manuel Munz <freifunk-at-somakoma-dot-de>))
519
520 ### Translations ###
521 define translation
522   define Package/luci-i18n-$(1)
523     SECTION:=luci
524     CATEGORY:=LuCI
525     TITLE:=LuCI - Lua Configuration Interface
526     URL:=http://luci.subsignal.org/
527     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
528     SUBMENU:=5. Translations
529     TITLE:=$(if $(2),$(2),$(1))
530   endef
531
532   define Package/luci-i18n-$(1)/install
533         $(call Package/luci/install/template,$$(1),i18n/$(1))
534   endef
535
536   ifneq ($(CONFIG_PACKAGE_luci-i18n-$(1)),)
537     LUCI_SELECTED_MODULES+=i18n/$(1)
538   endif
539
540   LUCI_BUILD_PACKAGES += luci-i18n-$(1)
541 endef
542
543 $(eval $(call translation,german,German))
544 $(eval $(call translation,english,English))
545 $(eval $(call translation,french,French (by Florian Fainelli)))
546 $(eval $(call translation,italian,Italian (by Matteo Croce)))
547 $(eval $(call translation,russian,Russian (by Skryabin Dmitry)))
548 $(eval $(call translation,portuguese-brazilian,Portuguese (Brazilian) (by Carlos Cesario)))
549 $(eval $(call translation,chinese,Chinese (by Chinese Translators)))
550 $(eval $(call translation,japanese,Japanese (by Tsukasa Hamano)))
551 $(eval $(call translation,greek,Greek (by Vasilis Tsiligiannis)))
552 $(eval $(call translation,catalan,Catalan (by Eduard Duran)))
553 $(eval $(call translation,portuguese,Portuguese (by Jose Monteiro)))
554 $(eval $(call translation,spanish,Spanish (by Guillermo Javier Nardoni)))
555 $(eval $(call translation,vietnamese,Vietnamese (by Hong Phuc Dang)))
556 $(eval $(call translation,malay,Malay (by Teow Wai Chet)))
557 $(eval $(call translation,norwegian,Norwegian (by Lars Hardy)))
558 $(eval $(call translation,hebrew,Hebrew))
559 $(eval $(call translation,romanian,Romanian))
560 $(eval $(call translation,ukrainian,Ukrainian))
561 $(eval $(call translation,hungarian,Hungarian))
562 $(eval $(call translation,polish,Polish))
563
564
565 ### Collections ###
566 define collection
567   define Package/luci$(if $(1),-$(1))
568     SECTION:=luci
569     CATEGORY:=LuCI
570     TITLE:=LuCI - Lua Configuration Interface
571     URL:=http://luci.subsignal.org/
572     MAINTAINER:=LuCI Development Team <luci@lists.subsignal.org>
573     SUBMENU:=1. Collections
574     TITLE:=$(if $(2),$(2),LuCI $(if $(1),$(1),general) collection)
575     $(if $(3),DEPENDS:=$(3))
576   endef
577
578   define Package/luci$(if $(1),-$(1))/install
579         true
580   endef
581
582   LUCI_BUILD_PACKAGES += luci$(if $(1),-$(1))
583 endef
584
585 $(eval $(call collection,,\
586         Standard OpenWrt set including full admin with ppp support and the \
587         default OpenWrt theme,\
588         +uhttpd +uhttpd-mod-ubus +luci-mod-admin-full +luci-theme-bootstrap \
589         +luci-app-firewall +luci-proto-core +luci-proto-ppp +libiwinfo-lua))
590
591 $(eval $(call collection,ssl,\
592         Standard OpenWrt set with HTTPS support,\
593         +luci +libustream-cyassl +px5g))
594
595 $(eval $(call collection,light,\
596         Minimum package set using only admin mini and the standard theme,\
597         +uhttpd +luci-mod-admin-mini +luci-theme-openwrt @BROKEN))
598
599
600 ### Compile ###
601 PKG_CONFIG_DEPENDS=$(patsubst %,CONFIG_PACKAGE_%,$(LUCI_BUILD_PACKAGES))
602
603 include $(INCLUDE_DIR)/package.mk
604
605 define Build/Prepare
606         @if [ ! -x $(LUCI_TOPDIR)/build/mkrevision.sh ]; then \
607                 echo "*** Repository layout changed!" >&2; \
608                 echo "*** Please change the LuCI url in feeds.conf to http://svn.luci.subsignal.org/luci/trunk and reinstall the feed with" >&2; \
609                 echo "*** ./scripts/feeds update luci; ./scripts/feeds install -a -p luci" >&2; \
610                 exit 1; \
611         fi
612         mkdir -p $(PKG_BUILD_DIR)
613         $(TAR) c -C $(LUCI_TOPDIR) . \
614                 --exclude=.pc --exclude=.svn --exclude=.git \
615                 --exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
616                 --exclude=dist | \
617                         tar x -C $(PKG_BUILD_DIR)/
618 endef
619
620 define Build/Configure
621 endef
622
623 MAKE_FLAGS += \
624         MODULES="$(LUCI_SELECTED_MODULES)" \
625         LUA_TARGET="$(LUA_TARGET)" \
626         LUA_SHLIBS="-llua -lm -ldl -lcrypt" \
627         CFLAGS="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
628         LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
629         NIXIO_TLS="$(NIXIO_TLS)" OS="Linux"
630
631
632 $(foreach b,$(LUCI_BUILD_PACKAGES),$(eval $(call BuildPackage,$(b))))