luci-0.9: merge r5769
[project/luci.git] / contrib / package / luci / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_BRANCH:=branches/luci-0.9
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 ifeq ($(USELOCAL),1)
13   PKG_VERSION:=0.9+svn
14 else
15   PKG_SOURCE_URL:=http://svn.luci.subsignal.org/luci/$(PKG_BRANCH)
16   ifeq ($(DUMP),)
17     PKG_REV:=$(shell LC_ALL=C svn info $(CURDIR) | sed -ne 's/^Revision: //p')
18     PKG_VERSION:=0.9+svn$(PKG_REV)
19   endif
20   PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21   PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
22   PKG_SOURCE_PROTO:=svn
23   PKG_SOURCE_VERSION:=$(PKG_REV)
24 endif
25
26 PKG_BUILD_DEPENDS:=$(if $(STAGING_DIR_ROOT),lua/host)
27 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
28 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
29
30 LUA_TARGET:=source
31 LUCI_CFLAGS:=
32 PKG_SELECTED_MODULES:=
33
34
35 include $(INCLUDE_DIR)/package.mk
36
37 ifeq ($(USELOCAL),1)
38   define Build/Prepare
39         mkdir -p $(PKG_BUILD_DIR)
40         $(TAR) c -C ../../../ . \
41                 --exclude=.pc --exclude=.svn --exclude=.git \
42                 --exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
43                 --exclude=dist | \
44                         tar x -C $(PKG_BUILD_DIR)/
45   endef
46 endif
47
48 define Build/Configure
49 endef
50
51 ### Templates ###
52
53 define Package/luci/libtemplate
54   SECTION:=luci
55   CATEGORY:=LuCI
56   TITLE:=LuCI - Lua Configuration Interface
57   URL:=http://luci.freifunk-halle.net/
58   MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
59   SUBMENU:=Libraries
60   DEPENDS:=+luci-core
61 endef
62
63 define Package/luci/fftemplate
64   $(call Package/luci/libtemplate)
65   SUBMENU:=Freifunk
66   DEPENDS:=+luci-mod-freifunk
67 endef
68
69 define Package/luci/i18ntemplate
70   $(call Package/luci/libtemplate)
71   SUBMENU:=Translations
72   DEPENDS:=+luci-web
73 endef
74
75 define Package/luci/thtemplate
76   $(call Package/luci/libtemplate)
77   SUBMENU:=Themes
78   DEPENDS:=+luci-web
79 endef
80
81 define Package/luci/webtemplate
82   $(call Package/luci/libtemplate)
83   SUBMENU:=Components
84 endef
85
86 define Package/luci/collectiontemplate
87   $(call Package/luci/libtemplate)
88   SUBMENU:=Collections
89 endef
90
91
92 define Package/luci/install/template
93         $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
94         $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
95 endef
96
97
98
99 ### Core package ###
100
101 define Package/luci-core
102   $(call Package/luci/libtemplate)
103   DEPENDS:=+lua +luci-nixio
104   TITLE:=LuCI core libraries
105 endef
106
107 define Package/luci-core/install
108         $(call Package/luci/install/template,$(1),libs/core)
109         $(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
110                 "OpenWrt Firmware" \
111                 "$(OPENWRTVERSION)" \
112                 "$(PKG_BRANCH)" \
113                 "$(PKG_VERSION)"
114 endef
115
116 define Package/luci-core/config
117        choice
118                prompt "Build Target"
119                default PACKAGE_luci-core_source
120
121        config PACKAGE_luci-core_compile
122                bool "Precompiled"
123
124        config PACKAGE_luci-core_stripped
125                bool "Stripped"
126
127        config PACKAGE_luci-core_source
128                bool "Full Source"
129
130        endchoice
131 endef
132
133 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
134   LUA_TARGET:=compile
135 endif
136
137 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
138   LUA_TARGET:=strip
139 endif
140
141 ifneq ($(CONFIG_PACKAGE_luci-core_zipped),)
142   LUA_TARGET:=gzip
143 endif
144
145
146 ### Libraries ###
147 define Package/luci-cbi
148   $(call Package/luci/libtemplate)
149   DEPENDS+=+luci-web +luci-uvl +luci-uci
150   TITLE:=Configuration Binding Interface
151 endef
152
153 define Package/luci-cbi/install
154         $(call Package/luci/install/template,$(1),libs/cbi)
155 endef
156
157
158 define Package/luci-uci
159   $(call Package/luci/libtemplate)
160   DEPENDS+=+libuci-lua
161   TITLE:=High-Level UCI API
162 endef
163
164 define Package/luci-uci/install
165         $(call Package/luci/install/template,$(1),libs/uci)
166 endef
167
168
169 define Package/luci-fastindex
170   $(call Package/luci/libtemplate)
171   TITLE:=Fastindex indexing module
172 endef
173
174 define Package/luci-fastindex/install
175         $(call Package/luci/install/template,$(1),libs/fastindex)
176 endef
177
178
179 define Package/luci-http
180   $(call Package/luci/libtemplate)
181   TITLE:=HTTP Protocol implementation
182 endef
183
184 define Package/luci-http/install
185         $(call Package/luci/install/template,$(1),libs/http)
186 endef
187
188
189 define Package/luci-httpclient
190   $(call Package/luci/libtemplate)
191   TITLE:=HTTP(S) client library
192   DEPENDS+=+luci-http +luci-nixio
193 endef
194
195 define Package/luci-httpclient/install
196         $(call Package/luci/install/template,$(1),libs/httpclient)
197 endef
198
199
200 define Package/luci-ipkg
201   $(call Package/luci/libtemplate)
202   TITLE:=LuCI IPKG/OPKG call abstraction library
203 endef
204
205 define Package/luci-ipkg/install
206         $(call Package/luci/install/template,$(1),libs/ipkg)
207 endef
208
209
210 define Package/luci-json
211   $(call Package/luci/libtemplate)
212   TITLE:=LuCI JSON Library
213 endef
214
215 define Package/luci-json/install
216         $(call Package/luci/install/template,$(1),libs/json)
217 endef
218
219
220 define Package/luci-lmo
221   $(call Package/luci/libtemplate)
222   TITLE:=lmo
223 endef
224
225 define Package/luci-lmo/install
226         $(call Package/luci/install/template,$(1),libs/lmo)
227 endef
228
229
230 define Package/luci-luanet
231   $(call Package/luci/libtemplate)
232   TITLE:=luanet
233   DEPENDS+=+libiw
234 endef
235
236 define Package/luci-luanet/install
237         $(call Package/luci/install/template,$(1),libs/luanet)
238 endef
239
240
241 define Package/luci-lucid
242   $(call Package/luci/libtemplate)
243   TITLE:=LuCId Superserver
244   DEPENDS+=+luci-nixio +luci-http +luci-px5g
245 endef
246
247 define Package/luci-lucid/install
248         $(call Package/luci/install/template,$(1),libs/lucid)
249         $(call Package/luci/install/template,$(1),libs/lucid-http)
250 endef
251
252
253
254 NIXIO_TLS:=axtls
255
256 define Package/luci-nixio
257   $(call Package/luci/libtemplate)
258   TITLE:=NIXIO POSIX Library
259   DEPENDS:=+PACKAGE_luci-nixio_openssl:libopenssl +PACKAGE_luci-nixio_cyassl:libcyassl
260 endef
261
262 define Package/luci-nixio/install
263         $(call Package/luci/install/template,$(1),libs/nixio)
264 endef
265
266 define Package/luci-nixio/config
267         choice
268                 prompt "TLS Provider"
269                 default PACKAGE_luci-nixio_axtls
270
271                 config PACKAGE_luci-nixio_axtls
272                         bool "Builtin (axTLS)"
273
274                 config PACKAGE_luci-nixio_cyassl
275                         bool "CyaSSL"
276                         select PACKAGE_libcyassl
277
278                 config PACKAGE_luci-nixio_openssl
279                         bool "OpenSSL"
280                         select PACKAGE_libopenssl
281         endchoice
282 endef
283
284 ifneq ($(CONFIG_PACKAGE_luci-nixio_openssl),)
285   NIXIO_TLS:=openssl
286 endif
287
288 ifneq ($(CONFIG_PACKAGE_luci-nixio_cyassl),)
289   NIXIO_TLS:=cyassl
290   LUCI_CFLAGS+=-I$(STAGING_DIR)/usr/include/cyassl
291 endif
292
293
294 define Package/luci-px5g
295   $(call Package/luci/libtemplate)
296   TITLE:=PX5G RSA Keymaster
297   DEPENDS:=+luci-nixio
298 endef
299
300 define Package/luci-px5g/install
301         $(call Package/luci/install/template,$(1),libs/px5g)
302 endef
303
304
305 define Package/luci-sys
306   $(call Package/luci/libtemplate)
307   TITLE:=LuCI Linux/POSIX system library
308 endef
309
310 define Package/luci-sys/install
311         $(call Package/luci/install/template,$(1),libs/sys)
312 endef
313
314
315 define Package/luci-web
316   $(call Package/luci/libtemplate)
317   DEPENDS+=+luci-http +luci-sys +luci-uci +luci-lucid +luci-sgi-cgi +luci-lmo
318   TITLE:=MVC Webframework
319   $(call Config,luci.main.lang,string,en,Default Language)
320 endef
321
322 define Package/luci-web/conffiles
323 /etc/config/luci
324 endef
325
326 define Package/luci-web/install
327         $(call Package/luci/install/template,$(1),libs/web)
328 endef
329
330
331 define Package/luci-uvl
332   $(call Package/luci/libtemplate)
333   DEPENDS+=+luci-sys +luci-uci +luci-core
334   TITLE:=UVL - UCI Validation Layer
335 endef
336
337 define Package/luci-uvl/install
338         $(call Package/luci/install/template,$(1),libs/uvl)
339 endef
340
341
342
343 ### Community Packages ###
344
345 define Package/luci-freifunk-community
346   $(call Package/luci/fftemplate)
347   DEPENDS+= \
348    +luci-lucid +luci-sgi-cgi +luci-app-splash \
349    +luci-app-ffwizard-leipzig \
350    +luci-i18n-german \
351    +PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
352    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-txtinfo +PACKAGE_luci-freifunk-community:olsrd-luci-mod-nameservice \
353    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-watchdog +PACKAGE_luci-freifunk-community:kmod-tun \
354    +PACKAGE_luci-freifunk-community:ip +PACKAGE_luci-freifunk-community:freifunk-watchdog +luci-app-olsr
355   TITLE:=Freifunk Community Meta-Package
356 endef
357
358 define Package/luci-freifunk-community/install
359         $(call Package/luci/install/template,$(1),applications/freifunk-community)
360 endef
361
362 ### Modules ###
363
364 define Package/luci-admin-core
365   $(call Package/luci/webtemplate)
366   DEPENDS+=+luci-web +luci-cbi +luci-i18n-english
367   TITLE:=Web UI Core Module
368 endef
369
370 define Package/luci-admin-core/install
371         $(call Package/luci/install/template,$(1),modules/admin-core)
372         touch $(1)/etc/init.d/luci_fixtime || true
373 endef
374
375
376 define Package/luci-admin-mini
377   $(call Package/luci/webtemplate)
378   DEPENDS+=+luci-admin-core
379   TITLE:=LuCI Essentials - stripped down and user-friendly
380 endef
381
382 define Package/luci-admin-mini/install
383         $(call Package/luci/install/template,$(1),modules/admin-mini)
384 endef
385
386
387 define Package/luci-admin-full
388   $(call Package/luci/webtemplate)
389   DEPENDS+=+luci-admin-core +luci-ipkg
390   TITLE:=LuCI Administration - full-featured for full control
391 endef
392
393 define Package/luci-admin-full/install
394         $(call Package/luci/install/template,$(1),modules/admin-full)
395 endef
396
397
398 define Package/luci-admin-rpc
399   $(call Package/luci/webtemplate)
400   DEPENDS+=+luci-json
401   TITLE:=LuCI RPC - JSON-RPC API
402 endef
403
404 define Package/luci-admin-rpc/install
405         $(call Package/luci/install/template,$(1),modules/rpc)
406 endef
407
408
409 define Package/luci-mod-freifunk
410   $(call Package/luci/fftemplate)
411   DEPENDS:=+luci-admin-full +luci-json +PACKAGE_luci-mod-freifunk:freifunk-firewall
412   TITLE:=LuCI Freifunk module
413 endef
414
415 define Package/luci-mod-freifunk/conffiles
416 /etc/config/freifunk
417 endef
418
419 define Package/luci-mod-freifunk/install
420         $(call Package/luci/install/template,$(1),modules/freifunk)
421 endef
422
423
424
425 ### Applications ###
426
427 define Package/luci-app-ffwizard-leipzig
428   $(call Package/luci/fftemplate)
429   TITLE:=Freifunk Leipzig configuration wizard
430 endef
431
432 define Package/luci-app-ffwizard-leipzig/install
433         $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
434 endef
435
436
437 define Package/luci-app-siitwizard
438   $(call Package/luci/fftemplate)
439   TITLE:=SIIT IPv4-over-IPv6 configuration wizard
440   DEPENDS:=+luci-admin-core +PACKAGE_luci-app-siitwizard:kmod-siit
441 endef
442
443 define Package/luci-app-siitwizard/install
444         $(call Package/luci/install/template,$(1),applications/luci-siitwizard)
445 endef
446
447
448 define Package/luci-app-firewall
449   $(call Package/luci/webtemplate)
450   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-firewall:firewall
451   TITLE:=Firewall and Portforwarding application
452 endef
453
454 define Package/luci-app-firewall/install
455         $(call Package/luci/install/template,$(1),applications/luci-fw)
456 endef
457
458
459 define Package/luci-app-olsr
460   $(call Package/luci/webtemplate)
461   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-olsr:olsrd-luci \
462    +PACKAGE_luci-app-olsr:olsrd-luci-mod-txtinfo
463   TITLE:=OLSR configuration and status module
464 endef
465
466 define Package/luci-app-olsr/install
467         $(call Package/luci/install/template,$(1),applications/luci-olsr)
468 endef
469
470
471 define Package/luci-app-qos
472   $(call Package/luci/webtemplate)
473   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-qos:qos-scripts
474   TITLE:=Quality of Service configuration module
475 endef
476
477 define Package/luci-app-qos/install
478         $(call Package/luci/install/template,$(1),applications/luci-qos)
479 endef
480
481
482 define Package/luci-app-splash
483   $(call Package/luci/fftemplate)
484   DEPENDS+=+PACKAGE_luci-app-splash:luci-nixio \
485    +PACKAGE_luci-app-splash:tc +PACKAGE_luci-app-splash:kmod-sched \
486    +PACKAGE_luci-app-splash:iptables-mod-nat-extra \
487    +PACKAGE_luci-app-splash:iptables-mod-ipopt
488   TITLE:=Freifunk DHCP-Splash application
489 endef
490
491 define Package/luci-app-splash/conffiles
492 /etc/config/luci_splash
493 endef
494
495 define Package/luci-app-splash/install
496         $(call Package/luci/install/template,$(1),applications/luci-splash)
497 endef
498
499
500 define Package/luci-app-statistics
501   $(call Package/luci/webtemplate)
502   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-statistics:collectd \
503    +PACKAGE_luci-app-statistics:rrdtool1 \
504    +PACKAGE_luci-app-statistics:collectd-mod-rrdtool \
505    +PACKAGE_luci-app-statistics:collectd-mod-wireless \
506    +PACKAGE_luci-app-statistics:collectd-mod-interface \
507    +PACKAGE_luci-app-statistics:collectd-mod-load
508   TITLE:=LuCI Statistics Application
509 endef
510
511 define Package/luci-app-statistics/conffiles
512 /etc/config/luci_statistics
513 endef
514
515 define Package/luci-app-statistics/install
516         $(call Package/luci/install/template,$(1),applications/luci-statistics)
517 endef
518
519 define Package/luci-app-upnp
520   $(call Package/luci/webtemplate)
521   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-upnp:miniupnpd
522   TITLE:=Universal Plug & Play configuration module
523 endef
524
525 define Package/luci-app-upnp/install
526         $(call Package/luci/install/template,$(1),applications/luci-upnp)
527 endef
528
529
530 define Package/luci-app-ntpc
531   $(call Package/luci/webtemplate)
532   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-ntpc:ntpclient
533   TITLE:=NTP time synchronisation client configuration module
534 endef
535
536 define Package/luci-app-ntpc/install
537         $(call Package/luci/install/template,$(1),applications/luci-ntpc)
538 endef
539
540
541 define Package/luci-app-ddns
542   $(call Package/luci/webtemplate)
543   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-ddns:ddns-scripts
544   TITLE:=Dynamic DNS configuration module
545 endef
546
547 define Package/luci-app-ddns/install
548         $(call Package/luci/install/template,$(1),applications/luci-ddns)
549 endef
550
551
552 define Package/luci-app-samba
553   $(call Package/luci/webtemplate)
554   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-samba:samba3
555   TITLE:=Network Shares - Samba SMB/CIFS module
556 endef
557
558 define Package/luci-app-samba/install
559         $(call Package/luci/install/template,$(1),applications/luci-samba)
560 endef
561
562
563 define Package/luci-app-mmc-over-gpio
564   $(call Package/luci/webtemplate)
565   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-mmc-over-gpio:kmod-mmc-over-gpio
566   TITLE:=mmc_over_gpio
567 endef
568
569 define Package/luci-app-mmc-over-gpio/install
570         $(call Package/luci/install/template,$(1),applications/luci-mmc-over-gpio)
571 endef
572
573
574 define Package/luci-app-p910nd
575   $(call Package/luci/webtemplate)
576   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-p910nd:p910nd
577   TITLE:=p910nd - Printer server module
578 endef
579
580 define Package/luci-app-p910nd/install
581         $(call Package/luci/install/template,$(1),applications/luci-p910nd)
582 endef
583
584
585 define Package/luci-app-ushare
586   $(call Package/luci/webtemplate)
587   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-ushare:ushare
588   TITLE:=ushare - UPnP A/V & DLNA Media Server
589 endef
590
591 define Package/luci-app-ushare/install
592         $(call Package/luci/install/template,$(1),applications/luci-ushare)
593 endef
594
595 define Package/luci-app-hd-idle
596   $(call Package/luci/webtemplate)
597   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-hd-idle:hd-idle
598   TITLE:=hd-idle
599 endef
600
601 define Package/luci-app-hd-idle/install
602         $(call Package/luci/install/template,$(1),applications/luci-hd-idle)
603 endef
604
605 define Package/luci-app-tinyproxy
606   $(call Package/luci/webtemplate)
607   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-tinyproxy:tinyproxy
608   TITLE:=Tinyproxy - HTTP(S)-Proxy
609 endef
610
611 define Package/luci-app-tinyproxy/install
612         $(call Package/luci/install/template,$(1),applications/luci-tinyproxy)
613 endef
614
615 define Package/luci-app-initmgr
616   $(call Package/luci/webtemplate)
617   DEPENDS+=+luci-admin-full
618   TITLE:=LuCI Initscript Management
619 endef
620
621 define Package/luci-app-initmgr/install
622         $(call Package/luci/install/template,$(1),applications/luci-initmgr)
623 endef
624
625 define Package/luci-app-livestats
626   $(call Package/luci/webtemplate)
627   DEPENDS+=+luci-admin-core +luci-admin-rpc
628   TITLE:=LuCI Realtime Statistics
629 endef
630
631 define Package/luci-app-livestats/install
632         $(call Package/luci/install/template,$(1),applications/luci-livestats)
633 endef
634
635 define Package/luci-app-polipo
636   $(call Package/luci/webtemplate)
637   TITLE:=LuCI Support for the Polipo Proxy
638   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-polipo:polipo
639 endef
640
641 define Package/luci-app-polipo/install
642         $(call Package/luci/install/template,$(1),applications/luci-polipo)
643 endef
644
645 define Package/luci-app-openvpn
646   $(call Package/luci/webtemplate)
647   TITLE:=LuCI Support for OpenVPN
648   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-openvpn:openvpn
649 endef
650
651 define Package/luci-app-openvpn/install
652         $(call Package/luci/install/template,$(1),applications/luci-openvpn)
653 endef
654
655 define Package/luci-app-p2pblock
656   $(call Package/luci/webtemplate)
657   TITLE:=LuCI Support for the Freifunk P2P-Block addon
658   DEPENDS+=+luci-admin-core +luci-app-firewall \
659     +PACKAGE_luci-app-p2pblock:freifunk-p2pblock
660 endef
661
662 define Package/luci-app-p2pblock/install
663         $(call Package/luci/install/template,$(1),applications/luci-p2pblock)
664 endef
665
666
667 ### Server Gateway Interfaces ###
668
669 define Package/luci-sgi-cgi
670   $(call Package/luci/libtemplate)
671   TITLE:=SGI for CGI
672 endef
673
674 define Package/luci-sgi-cgi/install
675         $(call Package/luci/install/template,$(1),libs/sgi-cgi)
676 endef
677
678 ### Themes ###
679 define Package/luci-theme-base
680   $(call Package/luci/thtemplate)
681   DEPENDS:=+luci-web
682   TITLE:=Common base for all themes
683 endef
684
685 define Package/luci-theme-base/install
686         $(call Package/luci/install/template,$(1),themes/base)
687 endef
688
689 define Package/luci-theme-fledermaus
690   $(call Package/luci/fftemplate)
691   DEPENDS:=+luci-web
692   TITLE:=Fledermaus Theme
693 endef
694
695 define Package/luci-theme-fledermaus/install
696         $(call Package/luci/install/template,$(1),themes/fledermaus)
697 endef
698
699 define Package/luci-theme-freifunk
700   $(call Package/luci/fftemplate)
701   DEPENDS:=+luci-web
702   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
703   TITLE:=alternative Freifunk Theme
704 endef
705
706 define Package/luci-theme-freifunk/install
707         $(call Package/luci/install/template,$(1),themes/freifunk)
708 endef
709
710 define Package/luci-theme-freifunk-bno
711   $(call Package/luci/fftemplate)
712   DEPENDS:=+luci-web
713   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
714   TITLE:=Freifunk Berlin Nordost Theme
715 endef
716
717 define Package/luci-theme-freifunk-bno/install
718         $(call Package/luci/install/template,$(1),themes/freifunk-bno)
719 endef
720
721 define Package/luci-theme-freifunk-hannover
722   $(call Package/luci/fftemplate)
723   DEPENDS:=+luci-web
724   MAINTAINER:=Mikolas Bingemer <mickey-at-freifunk-hannover-dot-de>
725   TITLE:=Freifunk Hannover Theme
726 endef
727
728 define Package/luci-theme-freifunk-hannover/install
729         $(call Package/luci/install/template,$(1),themes/freifunk-hannover)
730 endef
731
732 define Package/luci-theme-openwrt
733   $(call Package/luci/thtemplate)
734   TITLE:=OpenWrt.org (default)
735   DEPENDS:=+luci-theme-base luci-core
736   DEFAULT:=y if PACKAGE_luci-core
737 endef
738
739 define Package/luci-theme-openwrt/install
740         $(call Package/luci/install/template,$(1),themes/openwrt.org)
741 endef
742
743 define Package/luci-theme-openwrtlight
744   $(call Package/luci/thtemplate)
745   TITLE:=OpenWrt.org - light variant without images
746   DEPENDS:=+luci-theme-base
747 endef
748
749 define Package/luci-theme-openwrtlight/install
750         $(call Package/luci/install/template,$(1),themes/openwrt-light)
751 endef
752
753
754 ### Translations ###
755 define Package/luci-i18n-german
756   $(call Package/luci/i18ntemplate)
757   TITLE:=German
758 endef
759
760 define Package/luci-i18n-german/install
761         $(call Package/luci/install/template,$(1),i18n/german)
762 endef
763
764
765 define Package/luci-i18n-english
766   $(call Package/luci/i18ntemplate)
767   TITLE:=English
768 endef
769
770 define Package/luci-i18n-english/install
771         $(call Package/luci/install/template,$(1),i18n/english)
772 endef
773
774
775 define Package/luci-i18n-french
776   $(call Package/luci/i18ntemplate)
777   TITLE:=French (by Florian Fainelli)
778 endef
779
780 define Package/luci-i18n-french/install
781         $(call Package/luci/install/template,$(1),i18n/french)
782 endef
783
784
785 define Package/luci-i18n-italian
786   $(call Package/luci/i18ntemplate)
787   TITLE:=Italian (by Matteo Croce)
788 endef
789
790 define Package/luci-i18n-italian/install
791         $(call Package/luci/install/template,$(1),i18n/italian)
792 endef
793
794
795 define Package/luci-i18n-russian
796   $(call Package/luci/i18ntemplate)
797   TITLE:=Russian (by Skryabin Dmitry)
798 endef
799
800 define Package/luci-i18n-russian/install
801         $(call Package/luci/install/template,$(1),i18n/russian)
802 endef
803
804
805 define Package/luci-i18n-portuguese_brazilian
806   $(call Package/luci/i18ntemplate)
807   TITLE:=Portuguese (Brazilian) (by Carlos Cesario)
808 endef
809
810 define Package/luci-i18n-portuguese_brazilian/install
811         $(call Package/luci/install/template,$(1),i18n/portuguese_brazilian)
812 endef
813
814
815 define Package/luci-i18n-japanese
816   $(call Package/luci/i18ntemplate)
817   TITLE:=Japanese (by Tsukasa Hamano)
818 endef
819
820 define Package/luci-i18n-japanese/install
821         $(call Package/luci/install/template,$(1),i18n/japanese)
822 endef
823
824
825 define Package/luci-i18n-greek
826   $(call Package/luci/i18ntemplate)
827   TITLE:=Greek (by Vasilis Tsiligiannis)
828 endef
829
830 define Package/luci-i18n-greek/install
831         $(call Package/luci/install/template,$(1),i18n/greek)
832 endef
833
834
835 define Package/luci-i18n-catalan
836   $(call Package/luci/i18ntemplate)
837   TITLE:=Catalan (by Eduard Duran)
838 endef
839
840 define Package/luci-i18n-catalan/install
841         $(call Package/luci/install/template,$(1),i18n/catalan)
842 endef
843
844
845 define Package/luci-i18n-portuguese
846   $(call Package/luci/i18ntemplate)
847   TITLE:=Portuguese (by Jose Monteiro)
848 endef
849
850 define Package/luci-i18n-portuguese/install
851         $(call Package/luci/install/template,$(1),i18n/portuguese)
852 endef
853
854
855 define Package/luci-i18n-spanish
856   $(call Package/luci/i18ntemplate)
857   TITLE:=Spanish (by Guillermo Javier Nardoni)
858 endef
859
860 define Package/luci-i18n-spanish/install
861         $(call Package/luci/install/template,$(1),i18n/spanish)
862 endef
863
864
865 ### Collections ###
866 define Package/luci
867   $(call Package/luci/collectiontemplate)
868   TITLE:=Standard OpenWrt Kamikaze set including full and mini admin and the standard theme
869   DEPENDS:=+luci-admin-full +luci-admin-mini +luci-theme-openwrt +luci-app-firewall +luci-app-initmgr
870 endef
871
872 define Package/luci/install
873         true
874 endef
875
876
877 define Package/luci-light
878   $(call Package/luci/collectiontemplate)
879   TITLE:=Minimum package set using only admin mini and a theme without grafics
880   DEPENDS:=+luci-admin-mini +luci-theme-openwrtlight
881 endef
882
883 define Package/luci-light/install
884         true
885 endef
886
887
888 ### Compile ###
889 ifneq ($(CONFIG_PACKAGE_luci-core),)
890         PKG_SELECTED_MODULES+=libs/core
891 endif
892 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
893         PKG_SELECTED_MODULES+=libs/cbi
894 endif
895 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
896         PKG_SELECTED_MODULES+=libs/fastindex
897 endif
898 ifneq ($(CONFIG_PACKAGE_luci-http),)
899         PKG_SELECTED_MODULES+=libs/http
900 endif
901 ifneq ($(CONFIG_PACKAGE_luci-httpclient),)
902         PKG_SELECTED_MODULES+=libs/httpclient
903 endif
904 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
905         PKG_SELECTED_MODULES+=libs/ipkg
906 endif
907 ifneq ($(CONFIG_PACKAGE_luci-json),)
908         PKG_SELECTED_MODULES+=libs/json
909 endif
910 ifneq ($(CONFIG_PACKAGE_luci-lmo),)
911         PKG_SELECTED_MODULES+=libs/lmo
912 endif
913 ifneq ($(CONFIG_PACKAGE_luci-luanet),)
914         PKG_SELECTED_MODULES+=libs/luanet
915 endif
916 ifneq ($(CONFIG_PACKAGE_luci-lucid),)
917         PKG_SELECTED_MODULES+=libs/lucid libs/lucid-http
918 endif
919 ifneq ($(CONFIG_PACKAGE_luci-nixio),)
920         PKG_SELECTED_MODULES+=libs/nixio
921 endif
922 ifneq ($(CONFIG_PACKAGE_luci-px5g),)
923         PKG_SELECTED_MODULES+=libs/px5g
924 endif
925 ifneq ($(CONFIG_PACKAGE_luci-uci),)
926         PKG_SELECTED_MODULES+=libs/uci
927 endif
928 ifneq ($(CONFIG_PACKAGE_luci-sys),)
929         PKG_SELECTED_MODULES+=libs/sys
930 endif
931 ifneq ($(CONFIG_PACKAGE_luci-web),)
932         PKG_SELECTED_MODULES+=libs/web
933 endif
934 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
935         PKG_SELECTED_MODULES+=libs/uvl
936 endif
937
938 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
939         PKG_SELECTED_MODULES+=modules/admin-core
940 endif
941 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
942         PKG_SELECTED_MODULES+=modules/admin-mini
943 endif
944 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
945         PKG_SELECTED_MODULES+=modules/admin-full
946 endif
947 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
948         PKG_SELECTED_MODULES+=modules/rpc
949 endif
950 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
951         PKG_SELECTED_MODULES+=modules/freifunk
952 endif
953
954 ifneq ($(CONFIG_PACKAGE_luci-freifunk-community),)
955         PKG_SELECTED_MODULES+=applications/freifunk-community
956 endif
957
958 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
959         PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
960 endif
961 ifneq ($(CONFIG_PACKAGE_luci-app-siitwizard),)
962         PKG_SELECTED_MODULES+=applications/luci-siitwizard
963 endif
964 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
965         PKG_SELECTED_MODULES+=applications/luci-fw
966 endif
967 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
968         PKG_SELECTED_MODULES+=applications/luci-olsr
969 endif
970 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
971         PKG_SELECTED_MODULES+=applications/luci-qos
972 endif
973 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
974         PKG_SELECTED_MODULES+=applications/luci-splash
975 endif
976 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
977         PKG_SELECTED_MODULES+=applications/luci-statistics
978 endif
979 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
980         PKG_SELECTED_MODULES+=applications/luci-upnp
981 endif
982 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
983         PKG_SELECTED_MODULES+=applications/luci-ntpc
984 endif
985 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
986         PKG_SELECTED_MODULES+=applications/luci-ddns
987 endif
988 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
989         PKG_SELECTED_MODULES+=applications/luci-samba
990 endif
991 ifneq ($(CONFIG_PACKAGE_luci-app-mmc-over-gpio),)
992         PKG_SELECTED_MODULES+=applications/luci-mmc-over-gpio
993 endif
994 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
995         PKG_SELECTED_MODULES+=applications/luci-p910nd
996 endif
997 ifneq ($(CONFIG_PACKAGE_luci-app-ushare),)
998         PKG_SELECTED_MODULES+=applications/luci-ushare
999 endif
1000 ifneq ($(CONFIG_PACKAGE_luci-app-hd-idle),)
1001        PKG_SELECTED_MODULES+=applications/luci-hd-idle
1002 endif
1003 ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),)
1004        PKG_SELECTED_MODULES+=applications/luci-tinyproxy
1005 endif
1006 ifneq ($(CONFIG_PACKAGE_luci-app-initmgr),)
1007        PKG_SELECTED_MODULES+=applications/luci-initmgr
1008 endif
1009 ifneq ($(CONFIG_PACKAGE_luci-app-livestats),)
1010        PKG_SELECTED_MODULES+=applications/luci-livestats
1011 endif
1012 ifneq ($(CONFIG_PACKAGE_luci-app-polipo),)
1013        PKG_SELECTED_MODULES+=applications/luci-polipo
1014 endif
1015 ifneq ($(CONFIG_PACKAGE_luci-app-openvpn),)
1016        PKG_SELECTED_MODULES+=applications/luci-openvpn
1017 endif
1018 ifneq ($(CONFIG_PACKAGE_luci-app-p2pblock),)
1019        PKG_SELECTED_MODULES+=applications/luci-p2pblock
1020 endif
1021
1022
1023 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
1024         PKG_SELECTED_MODULES+=libs/sgi-cgi
1025 endif
1026 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
1027         PKG_SELECTED_MODULES+=libs/sgi-luci
1028 endif
1029
1030 ifneq ($(CONFIG_PACKAGE_luci-theme-base),)
1031         PKG_SELECTED_MODULES+=themes/base
1032 endif
1033 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
1034         PKG_SELECTED_MODULES+=themes/fledermaus
1035 endif
1036 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-bno),)
1037         PKG_SELECTED_MODULES+=themes/freifunk-bno
1038 endif
1039 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-hannover),)
1040         PKG_SELECTED_MODULES+=themes/freifunk-hannover
1041 endif
1042 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk),)
1043         PKG_SELECTED_MODULES+=themes/freifunk
1044 endif
1045 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
1046         PKG_SELECTED_MODULES+=themes/openwrt.org
1047 endif
1048 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
1049         PKG_SELECTED_MODULES+=themes/openwrt-light
1050 endif
1051
1052 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
1053         PKG_SELECTED_MODULES+=i18n/german
1054 endif
1055 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
1056         PKG_SELECTED_MODULES+=i18n/english
1057 endif
1058 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
1059         PKG_SELECTED_MODULES+=i18n/french
1060 endif
1061 ifneq ($(CONFIG_PACKAGE_luci-i18n-italian),)
1062         PKG_SELECTED_MODULES+=i18n/italian
1063 endif
1064 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
1065         PKG_SELECTED_MODULES+=i18n/russian
1066 endif
1067 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese_brazilian),)
1068         PKG_SELECTED_MODULES+=i18n/portuguese_brazilian
1069 endif
1070 ifneq ($(CONFIG_PACKAGE_luci-i18n-japanese),)
1071         PKG_SELECTED_MODULES+=i18n/japanese
1072 endif
1073 ifneq ($(CONFIG_PACKAGE_luci-i18n-greek),)
1074         PKG_SELECTED_MODULES+=i18n/greek
1075 endif
1076 ifneq ($(CONFIG_PACKAGE_luci-i18n-catalan),)
1077         PKG_SELECTED_MODULES+=i18n/catalan
1078 endif
1079 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese),)
1080         PKG_SELECTED_MODULES+=i18n/portuguese
1081 endif
1082 ifneq ($(CONFIG_PACKAGE_luci-i18n-spanish),)
1083         PKG_SELECTED_MODULES+=i18n/spanish
1084 endif
1085
1086
1087 MAKE_FLAGS += \
1088         MODULES="$(PKG_SELECTED_MODULES)" \
1089         LUA_TARGET="$(LUA_TARGET)" \
1090         LUA_SHLIBS="-llua -lm -ldl -lcrypt" \
1091         CFLAGS="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
1092         LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
1093         NIXIO_TLS="$(NIXIO_TLS)" OS="Linux"
1094
1095
1096 $(eval $(call BuildPackage,luci-core))
1097 $(eval $(call BuildPackage,luci-cbi))
1098 $(eval $(call BuildPackage,luci-fastindex))
1099 $(eval $(call BuildPackage,luci-http))
1100 $(eval $(call BuildPackage,luci-httpclient))
1101 $(eval $(call BuildPackage,luci-ipkg))
1102 $(eval $(call BuildPackage,luci-json))
1103 $(eval $(call BuildPackage,luci-lmo))
1104 $(eval $(call BuildPackage,luci-luanet))
1105 $(eval $(call BuildPackage,luci-lucid))
1106 $(eval $(call BuildPackage,luci-nixio))
1107 $(eval $(call BuildPackage,luci-px5g))
1108 $(eval $(call BuildPackage,luci-uci))
1109 $(eval $(call BuildPackage,luci-sys))
1110 $(eval $(call BuildPackage,luci-web))
1111 $(eval $(call BuildPackage,luci-uvl))
1112
1113 $(eval $(call BuildPackage,luci-admin-core))
1114 $(eval $(call BuildPackage,luci-admin-mini))
1115 $(eval $(call BuildPackage,luci-admin-full))
1116 $(eval $(call BuildPackage,luci-admin-rpc))
1117 $(eval $(call BuildPackage,luci-mod-freifunk))
1118
1119 $(eval $(call BuildPackage,luci-freifunk-community))
1120
1121 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
1122 $(eval $(call BuildPackage,luci-app-siitwizard))
1123 $(eval $(call BuildPackage,luci-app-firewall))
1124 $(eval $(call BuildPackage,luci-app-olsr))
1125 $(eval $(call BuildPackage,luci-app-qos))
1126 $(eval $(call BuildPackage,luci-app-splash))
1127 $(eval $(call BuildPackage,luci-app-statistics))
1128 $(eval $(call BuildPackage,luci-app-upnp))
1129 $(eval $(call BuildPackage,luci-app-ntpc))
1130 $(eval $(call BuildPackage,luci-app-ddns))
1131 $(eval $(call BuildPackage,luci-app-samba))
1132 $(eval $(call BuildPackage,luci-app-mmc-over-gpio))
1133 $(eval $(call BuildPackage,luci-app-p910nd))
1134 $(eval $(call BuildPackage,luci-app-ushare))
1135 $(eval $(call BuildPackage,luci-app-hd-idle))
1136 $(eval $(call BuildPackage,luci-app-tinyproxy))
1137 $(eval $(call BuildPackage,luci-app-initmgr))
1138 $(eval $(call BuildPackage,luci-app-livestats))
1139 $(eval $(call BuildPackage,luci-app-polipo))
1140 $(eval $(call BuildPackage,luci-app-openvpn))
1141 $(eval $(call BuildPackage,luci-app-p2pblock))
1142
1143 $(eval $(call BuildPackage,luci-sgi-cgi))
1144
1145 $(eval $(call BuildPackage,luci-theme-base))
1146 $(eval $(call BuildPackage,luci-theme-fledermaus))
1147 $(eval $(call BuildPackage,luci-theme-freifunk))
1148 $(eval $(call BuildPackage,luci-theme-freifunk-bno))
1149 $(eval $(call BuildPackage,luci-theme-freifunk-hannover))
1150 $(eval $(call BuildPackage,luci-theme-openwrt))
1151 $(eval $(call BuildPackage,luci-theme-openwrtlight))
1152
1153 $(eval $(call BuildPackage,luci-i18n-german))
1154 $(eval $(call BuildPackage,luci-i18n-english))
1155 $(eval $(call BuildPackage,luci-i18n-french))
1156 $(eval $(call BuildPackage,luci-i18n-italian))
1157 $(eval $(call BuildPackage,luci-i18n-russian))
1158 $(eval $(call BuildPackage,luci-i18n-portuguese_brazilian))
1159 $(eval $(call BuildPackage,luci-i18n-japanese))
1160 $(eval $(call BuildPackage,luci-i18n-greek))
1161 $(eval $(call BuildPackage,luci-i18n-catalan))
1162 $(eval $(call BuildPackage,luci-i18n-portuguese))
1163 $(eval $(call BuildPackage,luci-i18n-spanish))
1164
1165 $(eval $(call BuildPackage,luci))
1166 $(eval $(call BuildPackage,luci-light))