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