luci-0.9: merge r5124
[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_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
27 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
28
29 LUA_TARGET:=source
30 LUCI_CFLAGS:=
31 PKG_SELECTED_MODULES:=
32
33
34 include $(INCLUDE_DIR)/package.mk
35
36 ifeq ($(USELOCAL),1)
37   define Build/Prepare
38         mkdir -p $(PKG_BUILD_DIR)
39         $(TAR) c -C ../../../ . \
40                 --exclude=.pc --exclude=.svn --exclude=.git \
41                 --exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
42                 --exclude=dist | \
43                         tar x -C $(PKG_BUILD_DIR)/
44   endef
45 endif
46
47 define Build/Configure
48 endef
49
50 ### Templates ###
51
52 define Package/luci/libtemplate
53   SECTION:=luci
54   CATEGORY:=LuCI
55   TITLE:=LuCI - Lua Configuration Interface
56   URL:=http://luci.freifunk-halle.net/
57   MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
58   SUBMENU:=Libraries
59   DEPENDS:=+luci-core
60 endef
61
62 define Package/luci/fftemplate
63   $(call Package/luci/libtemplate)
64   SUBMENU:=Freifunk
65   DEPENDS:=+luci-mod-freifunk
66 endef
67
68 define Package/luci/i18ntemplate
69   $(call Package/luci/libtemplate)
70   SUBMENU:=Translations
71   DEPENDS:=+luci-web
72 endef
73
74 define Package/luci/thtemplate
75   $(call Package/luci/libtemplate)
76   SUBMENU:=Themes
77   DEPENDS:=+luci-web
78 endef
79
80 define Package/luci/webtemplate
81   $(call Package/luci/libtemplate)
82   SUBMENU:=Components
83 endef
84
85
86 define Package/luci/install/template
87         $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
88         $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
89 endef
90
91
92
93 ### Core package ###
94
95 define Package/luci-core
96   $(call Package/luci/libtemplate)
97   DEPENDS:=+lua +luci-nixio
98   TITLE:=LuCI core libraries
99 endef
100
101 define Package/luci-core/install
102         $(call Package/luci/install/template,$(1),libs/core)
103         $(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
104                 "OpenWrt Firmware" \
105                 "$(OPENWRTVERSION)" \
106                 "$(PKG_BRANCH)" \
107                 "$(PKG_VERSION)"
108 endef
109
110 define Package/luci-core/config
111        choice
112                prompt "Build Target"
113                default PACKAGE_luci-core_source
114
115        config PACKAGE_luci-core_compile
116                bool "Precompiled"
117
118        config PACKAGE_luci-core_stripped
119                bool "Stripped"
120
121        config PACKAGE_luci-core_source
122                bool "Full Source"
123
124        endchoice
125 endef
126
127 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
128   LUA_TARGET:=compile
129 endif
130
131 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
132   LUA_TARGET:=strip
133 endif
134
135 ifneq ($(CONFIG_PACKAGE_luci-core_zipped),)
136   LUA_TARGET:=gzip
137 endif
138
139
140 ### Libraries ###
141 define Package/luci-cbi
142   $(call Package/luci/libtemplate)
143   DEPENDS+=+luci-web +luci-uvl +luci-uci
144   TITLE:=Configuration Binding Interface
145 endef
146
147 define Package/luci-cbi/install
148         $(call Package/luci/install/template,$(1),libs/cbi)
149 endef
150
151
152 define Package/luci-uci
153   $(call Package/luci/libtemplate)
154   DEPENDS+=+libuci-lua
155   TITLE:=High-Level UCI API
156 endef
157
158 define Package/luci-uci/install
159         $(call Package/luci/install/template,$(1),libs/uci)
160 endef
161
162
163 define Package/luci-fastindex
164   $(call Package/luci/libtemplate)
165   TITLE:=Fastindex indexing module
166 endef
167
168 define Package/luci-fastindex/install
169         $(call Package/luci/install/template,$(1),libs/fastindex)
170 endef
171
172
173 define Package/luci-http
174   $(call Package/luci/libtemplate)
175   TITLE:=HTTP Protocol implementation
176 endef
177
178 define Package/luci-http/install
179         $(call Package/luci/install/template,$(1),libs/http)
180 endef
181
182
183 define Package/luci-httpclient
184   $(call Package/luci/libtemplate)
185   TITLE:=HTTP(S) client library
186   DEPENDS+=+luci-http +luci-nixio
187 endef
188
189 define Package/luci-httpclient/install
190         $(call Package/luci/install/template,$(1),libs/httpclient)
191 endef
192
193
194 define Package/luci-ipkg
195   $(call Package/luci/libtemplate)
196   TITLE:=LuCI IPKG/OPKG call abstraction library
197 endef
198
199 define Package/luci-ipkg/install
200         $(call Package/luci/install/template,$(1),libs/ipkg)
201 endef
202
203
204 define Package/luci-json
205   $(call Package/luci/libtemplate)
206   TITLE:=LuCI JSON Library
207 endef
208
209 define Package/luci-json/install
210         $(call Package/luci/install/template,$(1),libs/json)
211 endef
212
213
214 define Package/luci-lmo
215   $(call Package/luci/libtemplate)
216   TITLE:=lmo
217 endef
218
219 define Package/luci-lmo/install
220         $(call Package/luci/install/template,$(1),libs/lmo)
221 endef
222
223
224 define Package/luci-luanet
225   $(call Package/luci/libtemplate)
226   TITLE:=luanet
227   DEPENDS+=+libiw
228 endef
229
230 define Package/luci-luanet/install
231         $(call Package/luci/install/template,$(1),libs/luanet)
232 endef
233
234
235 define Package/luci-lucid
236   $(call Package/luci/libtemplate)
237   TITLE:=LuCId Superserver
238   DEPENDS+=+luci-nixio +luci-http +luci-px5g
239 endef
240
241 define Package/luci-lucid/install
242         $(call Package/luci/install/template,$(1),libs/lucid)
243         $(call Package/luci/install/template,$(1),libs/lucid-http)
244 endef
245
246
247
248 NIXIO_TLS:=axtls
249
250 define Package/luci-nixio
251   $(call Package/luci/libtemplate)
252   TITLE:=NIXIO POSIX Library
253   DEPENDS:=+PACKAGE_luci-nixio_openssl:libopenssl +PACKAGE_luci-nixio_cyassl:libcyassl-luci
254 endef
255
256 define Package/luci-nixio/install
257         $(call Package/luci/install/template,$(1),libs/nixio)
258 endef
259
260 define Package/luci-nixio/config
261         choice
262                 prompt "TLS Provider"
263                 default PACKAGE_luci-nixio_axtls
264
265                 config PACKAGE_luci-nixio_axtls
266                         bool "Builtin (axTLS)"
267
268                 config PACKAGE_luci-nixio_cyassl
269                         bool "CyaSSL"
270                         select PACKAGE_libcyassl-luci
271
272                 config PACKAGE_luci-nixio_openssl
273                         bool "OpenSSL"
274                         select PACKAGE_libopenssl
275         endchoice
276 endef
277
278 ifneq ($(CONFIG_PACKAGE_luci-nixio_openssl),)
279   NIXIO_TLS:=openssl
280 endif
281
282 ifneq ($(CONFIG_PACKAGE_luci-nixio_cyassl),)
283   NIXIO_TLS:=cyassl
284   LUCI_CFLAGS+=-I$(STAGING_DIR)/usr/include/cyassl
285 endif
286
287
288 define Package/luci-px5g
289   $(call Package/luci/libtemplate)
290   TITLE:=PX5G RSA Keymaster
291   DEPENDS:=+luci-nixio
292 endef
293
294 define Package/luci-px5g/install
295         $(call Package/luci/install/template,$(1),libs/px5g)
296 endef
297
298
299 define Package/luci-sys
300   $(call Package/luci/libtemplate)
301   TITLE:=LuCI Linux/POSIX system library
302 endef
303
304 define Package/luci-sys/install
305         $(call Package/luci/install/template,$(1),libs/sys)
306 endef
307
308
309 define Package/luci-web
310   $(call Package/luci/libtemplate)
311   DEPENDS+=+luci-http +luci-sys +luci-uci +luci-lucid +luci-sgi-cgi +luci-lmo
312   TITLE:=MVC Webframework
313   $(call Config,luci.main.lang,string,en,Default Language)
314 endef
315
316 define Package/luci-web/conffiles
317 /etc/config/luci
318 endef
319
320 define Package/luci-web/install
321         $(call Package/luci/install/template,$(1),libs/web)
322 endef
323
324
325 define Package/luci-uvl
326   $(call Package/luci/libtemplate)
327   DEPENDS+=+luci-sys +luci-uci +luci-core
328   TITLE:=UVL - UCI Validation Layer
329 endef
330
331 define Package/luci-uvl/install
332         $(call Package/luci/install/template,$(1),libs/uvl)
333 endef
334
335
336
337 ### Community Packages ###
338
339 define Package/luci-freifunk-community
340   $(call Package/luci/fftemplate)
341   DEPENDS+= \
342    +luci-lucid +luci-sgi-cgi +luci-app-splash \
343    +luci-app-ffwizard-leipzig \
344    +luci-i18n-german \
345    +PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
346    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-txtinfo +PACKAGE_luci-freifunk-community:olsrd-luci-mod-nameservice \
347    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-watchdog +PACKAGE_luci-freifunk-community:kmod-tun \
348    +PACKAGE_luci-freifunk-community:ip +PACKAGE_luci-freifunk-community:freifunk-watchdog +luci-app-olsr \
349    +PACKAGE_luci-freifunk-community:remote-update
350   TITLE:=Freifunk Community Meta-Package
351 endef
352
353 define Package/luci-freifunk-community/install
354         $(call Package/luci/install/template,$(1),applications/freifunk-community)
355 endef
356
357 ### Modules ###
358
359 define Package/luci-admin-core
360   $(call Package/luci/webtemplate)
361   DEPENDS+=+luci-web +luci-cbi +luci-i18n-english
362   TITLE:=Web UI Core Module
363 endef
364
365 define Package/luci-admin-core/conffiles
366 /etc/config/luci_hosts
367 /etc/config/luci_ethers
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-rrdtool1 \
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-uvc_streamer
564   $(call Package/luci/webtemplate)
565   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-uvc_streamer:uvc-streamer
566   TITLE:=Webcam Streaming - UVC-Streamer module
567 endef
568
569 define Package/luci-app-uvc_streamer/install
570         $(call Package/luci/install/template,$(1),applications/luci-uvc_streamer)
571 endef
572
573
574 define Package/luci-app-mmc_over_gpio
575   $(call Package/luci/webtemplate)
576   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-mmc_over_gpio:kmod-mmc-over-gpio
577   TITLE:=mmc_over_gpio
578 endef
579
580 define Package/luci-app-mmc_over_gpio/install
581         $(call Package/luci/install/template,$(1),applications/luci-mmc_over_gpio)
582 endef
583
584
585 define Package/luci-app-p910nd
586   $(call Package/luci/webtemplate)
587   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-p910nd:p910nd
588   TITLE:=p910nd - Printer server module
589 endef
590
591 define Package/luci-app-p910nd/install
592         $(call Package/luci/install/template,$(1),applications/luci-p910nd)
593 endef
594
595
596 define Package/luci-app-ushare
597   $(call Package/luci/webtemplate)
598   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-ushare:ushare
599   TITLE:=ushare - UPnP A/V & DLNA Media Server
600 endef
601
602 define Package/luci-app-ushare/install
603         $(call Package/luci/install/template,$(1),applications/luci-ushare)
604 endef
605
606 define Package/luci-app-hd_idle
607   $(call Package/luci/webtemplate)
608   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-hd_idle:hd-idle
609   TITLE:=hd-idle
610 endef
611
612 define Package/luci-app-hd_idle/install
613         $(call Package/luci/install/template,$(1),applications/luci-hd_idle)
614 endef
615
616 define Package/luci-app-tinyproxy
617   $(call Package/luci/webtemplate)
618   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-tinyproxy:tinyproxy
619   TITLE:=Tinyproxy - HTTP(S)-Proxy
620 endef
621
622 define Package/luci-app-tinyproxy/install
623         $(call Package/luci/install/template,$(1),applications/luci-tinyproxy)
624 endef
625
626 define Package/luci-app-initmgr
627   $(call Package/luci/webtemplate)
628   DEPENDS+=+luci-admin-full
629   TITLE:=LuCI Initscript Management
630 endef
631
632 define Package/luci-app-initmgr/install
633         $(call Package/luci/install/template,$(1),applications/luci-initmgr)
634 endef
635
636 define Package/luci-app-livestats
637   $(call Package/luci/webtemplate)
638   DEPENDS+=+luci-admin-core +luci-admin-rpc
639   TITLE:=LuCI Realtime Statistics
640 endef
641
642 define Package/luci-app-livestats/install
643         $(call Package/luci/install/template,$(1),applications/luci-livestats)
644 endef
645
646 define Package/luci-app-polipo
647   $(call Package/luci/webtemplate)
648   TITLE:=LuCI Support for the Polipo Proxy
649   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-polipo:polipo
650 endef
651
652 define Package/luci-app-polipo/install
653         $(call Package/luci/install/template,$(1),applications/luci-polipo)
654 endef
655
656 define Package/luci-app-openvpn
657   $(call Package/luci/webtemplate)
658   TITLE:=LuCI Support for OpenVPN
659   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-openvpn:openvpn
660 endef
661
662 define Package/luci-app-openvpn/install
663         $(call Package/luci/install/template,$(1),applications/luci-openvpn)
664 endef
665
666 define Package/luci-app-p2pblock
667   $(call Package/luci/webtemplate)
668   TITLE:=LuCI Support for the Freifunk P2P-Block addon
669   DEPENDS+=+luci-admin-core +luci-app-firewall \
670     +PACKAGE_luci-app-p2pblock:freifunk-p2pblock
671 endef
672
673 define Package/luci-app-p2pblock/install
674         $(call Package/luci/install/template,$(1),applications/luci-p2pblock)
675 endef
676
677
678 ### Server Gateway Interfaces ###
679
680 define Package/luci-sgi-cgi
681   $(call Package/luci/libtemplate)
682   TITLE:=SGI for CGI
683 endef
684
685 define Package/luci-sgi-cgi/install
686         $(call Package/luci/install/template,$(1),libs/sgi-cgi)
687 endef
688
689 ### Themes ###
690 define Package/luci-theme-base
691   $(call Package/luci/thtemplate)
692   DEPENDS:=+luci-web
693   TITLE:=Common base for all themes
694 endef
695
696 define Package/luci-theme-base/install
697         $(call Package/luci/install/template,$(1),themes/base)
698 endef
699
700 define Package/luci-theme-fledermaus
701   $(call Package/luci/fftemplate)
702   DEPENDS:=+luci-web
703   TITLE:=Fledermaus Theme
704 endef
705
706 define Package/luci-theme-fledermaus/install
707         $(call Package/luci/install/template,$(1),themes/fledermaus)
708 endef
709
710 define Package/luci-theme-freifunk
711   $(call Package/luci/fftemplate)
712   DEPENDS:=+luci-web
713   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
714   TITLE:=alternative Freifunk Theme
715 endef
716
717 define Package/luci-theme-freifunk/install
718         $(call Package/luci/install/template,$(1),themes/freifunk)
719 endef
720
721 define Package/luci-theme-freifunk-bno
722   $(call Package/luci/fftemplate)
723   DEPENDS:=+luci-web
724   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
725   TITLE:=Freifunk Berlin Nordost Theme
726 endef
727
728 define Package/luci-theme-freifunk-bno/install
729         $(call Package/luci/install/template,$(1),themes/freifunk-bno)
730 endef
731
732 define Package/luci-theme-freifunk-hannover
733   $(call Package/luci/fftemplate)
734   DEPENDS:=+luci-web
735   MAINTAINER:=Mikolas Bingemer <mickey-at-freifunk-hannover-dot-de>
736   TITLE:=Freifunk Hannover Theme
737 endef
738
739 define Package/luci-theme-freifunk-hannover/install
740         $(call Package/luci/install/template,$(1),themes/freifunk-hannover)
741 endef
742
743 define Package/luci-theme-openwrt
744   $(call Package/luci/thtemplate)
745   TITLE:=OpenWrt.org (default)
746   DEPENDS:=+luci-theme-base luci-core
747   DEFAULT:=y if PACKAGE_luci-core
748 endef
749
750 define Package/luci-theme-openwrt/install
751         $(call Package/luci/install/template,$(1),themes/openwrt.org)
752 endef
753
754 define Package/luci-theme-openwrtlight
755   $(call Package/luci/thtemplate)
756   TITLE:=OpenWrt.org - light variant without images
757   DEPENDS:=+luci-theme-base
758 endef
759
760 define Package/luci-theme-openwrtlight/install
761         $(call Package/luci/install/template,$(1),themes/openwrt-light)
762 endef
763
764
765 ### Translations ###
766 define Package/luci-i18n-german
767   $(call Package/luci/i18ntemplate)
768   TITLE:=German
769 endef
770
771 define Package/luci-i18n-german/install
772         $(call Package/luci/install/template,$(1),i18n/german)
773 endef
774
775
776 define Package/luci-i18n-english
777   $(call Package/luci/i18ntemplate)
778   TITLE:=English
779 endef
780
781 define Package/luci-i18n-english/install
782         $(call Package/luci/install/template,$(1),i18n/english)
783 endef
784
785
786 define Package/luci-i18n-french
787   $(call Package/luci/i18ntemplate)
788   TITLE:=French (by Florian Fainelli)
789 endef
790
791 define Package/luci-i18n-french/install
792         $(call Package/luci/install/template,$(1),i18n/french)
793 endef
794
795
796 define Package/luci-i18n-italian
797   $(call Package/luci/i18ntemplate)
798   TITLE:=Italian (by Matteo Croce)
799 endef
800
801 define Package/luci-i18n-italian/install
802         $(call Package/luci/install/template,$(1),i18n/italian)
803 endef
804
805
806 define Package/luci-i18n-russian
807   $(call Package/luci/i18ntemplate)
808   TITLE:=Russian (by Skryabin Dmitry)
809 endef
810
811 define Package/luci-i18n-russian/install
812         $(call Package/luci/install/template,$(1),i18n/russian)
813 endef
814
815
816 define Package/luci-i18n-portuguese_brazilian
817   $(call Package/luci/i18ntemplate)
818   TITLE:=Portuguese (Brazilian) (by Carlos Cesario)
819 endef
820
821 define Package/luci-i18n-portuguese_brazilian/install
822         $(call Package/luci/install/template,$(1),i18n/portuguese_brazilian)
823 endef
824
825
826 define Package/luci-i18n-japanese
827   $(call Package/luci/i18ntemplate)
828   TITLE:=Japanese (by Tsukasa Hamano)
829 endef
830
831 define Package/luci-i18n-japanese/install
832         $(call Package/luci/install/template,$(1),i18n/japanese)
833 endef
834
835
836 define Package/luci-i18n-greek
837   $(call Package/luci/i18ntemplate)
838   TITLE:=Greek (by Vasilis Tsiligiannis)
839 endef
840
841 define Package/luci-i18n-greek/install
842         $(call Package/luci/install/template,$(1),i18n/greek)
843 endef
844
845
846 define Package/luci-i18n-catalan
847   $(call Package/luci/i18ntemplate)
848   TITLE:=Catalan (by Eduard Duran)
849 endef
850
851 define Package/luci-i18n-catalan/install
852         $(call Package/luci/install/template,$(1),i18n/catalan)
853 endef
854
855
856 define Package/luci-i18n-portuguese
857   $(call Package/luci/i18ntemplate)
858   TITLE:=Portuguese (by Jose Monteiro)
859 endef
860
861 define Package/luci-i18n-portuguese/install
862         $(call Package/luci/install/template,$(1),i18n/portuguese)
863 endef
864
865
866 define Package/luci-i18n-spanish
867   $(call Package/luci/i18ntemplate)
868   TITLE:=Spanish (by Guillermo Javier Nardoni)
869 endef
870
871 define Package/luci-i18n-spanish/install
872         $(call Package/luci/install/template,$(1),i18n/spanish)
873 endef
874
875
876 ### Compile ###
877 ifneq ($(CONFIG_PACKAGE_luci-core),)
878         PKG_SELECTED_MODULES+=libs/core
879 endif
880 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
881         PKG_SELECTED_MODULES+=libs/cbi
882 endif
883 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
884         PKG_SELECTED_MODULES+=libs/fastindex
885 endif
886 ifneq ($(CONFIG_PACKAGE_luci-http),)
887         PKG_SELECTED_MODULES+=libs/http
888 endif
889 ifneq ($(CONFIG_PACKAGE_luci-httpclient),)
890         PKG_SELECTED_MODULES+=libs/httpclient
891 endif
892 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
893         PKG_SELECTED_MODULES+=libs/ipkg
894 endif
895 ifneq ($(CONFIG_PACKAGE_luci-json),)
896         PKG_SELECTED_MODULES+=libs/json
897 endif
898 ifneq ($(CONFIG_PACKAGE_luci-lmo),)
899         PKG_SELECTED_MODULES+=libs/lmo
900 endif
901 ifneq ($(CONFIG_PACKAGE_luci-luanet),)
902         PKG_SELECTED_MODULES+=libs/luanet
903 endif
904 ifneq ($(CONFIG_PACKAGE_luci-lucid),)
905         PKG_SELECTED_MODULES+=libs/lucid libs/lucid-http
906 endif
907 ifneq ($(CONFIG_PACKAGE_luci-nixio),)
908         PKG_SELECTED_MODULES+=libs/nixio
909 endif
910 ifneq ($(CONFIG_PACKAGE_luci-px5g),)
911         PKG_SELECTED_MODULES+=libs/px5g
912 endif
913 ifneq ($(CONFIG_PACKAGE_luci-uci),)
914         PKG_SELECTED_MODULES+=libs/uci
915 endif
916 ifneq ($(CONFIG_PACKAGE_luci-sys),)
917         PKG_SELECTED_MODULES+=libs/sys
918 endif
919 ifneq ($(CONFIG_PACKAGE_luci-web),)
920         PKG_SELECTED_MODULES+=libs/web
921 endif
922 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
923         PKG_SELECTED_MODULES+=libs/uvl
924 endif
925
926 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
927         PKG_SELECTED_MODULES+=modules/admin-core
928 endif
929 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
930         PKG_SELECTED_MODULES+=modules/admin-mini
931 endif
932 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
933         PKG_SELECTED_MODULES+=modules/admin-full
934 endif
935 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
936         PKG_SELECTED_MODULES+=modules/rpc
937 endif
938 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
939         PKG_SELECTED_MODULES+=modules/freifunk
940 endif
941
942 ifneq ($(CONFIG_PACKAGE_luci-freifunk-community),)
943         PKG_SELECTED_MODULES+=applications/freifunk-community
944 endif
945
946 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
947         PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
948 endif
949 ifneq ($(CONFIG_PACKAGE_luci-app-siitwizard),)
950         PKG_SELECTED_MODULES+=applications/luci-siitwizard
951 endif
952 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
953         PKG_SELECTED_MODULES+=applications/luci-fw
954 endif
955 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
956         PKG_SELECTED_MODULES+=applications/luci-olsr
957 endif
958 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
959         PKG_SELECTED_MODULES+=applications/luci-qos
960 endif
961 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
962         PKG_SELECTED_MODULES+=applications/luci-splash
963 endif
964 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
965         PKG_SELECTED_MODULES+=applications/luci-statistics
966 endif
967 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
968         PKG_SELECTED_MODULES+=applications/luci-upnp
969 endif
970 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
971         PKG_SELECTED_MODULES+=applications/luci-ntpc
972 endif
973 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
974         PKG_SELECTED_MODULES+=applications/luci-ddns
975 endif
976 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
977         PKG_SELECTED_MODULES+=applications/luci-samba
978 endif
979 ifneq ($(CONFIG_PACKAGE_luci-app-uvc_streamer),)
980         PKG_SELECTED_MODULES+=applications/luci-uvc_streamer
981 endif
982 ifneq ($(CONFIG_PACKAGE_luci-app-mmc_over_gpio),)
983         PKG_SELECTED_MODULES+=applications/luci-mmc_over_gpio
984 endif
985 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
986         PKG_SELECTED_MODULES+=applications/luci-p910nd
987 endif
988 ifneq ($(CONFIG_PACKAGE_luci-app-ushare),)
989         PKG_SELECTED_MODULES+=applications/luci-ushare
990 endif
991 ifneq ($(CONFIG_PACKAGE_luci-app-hd_idle),)
992        PKG_SELECTED_MODULES+=applications/luci-hd_idle
993 endif
994 ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),)
995        PKG_SELECTED_MODULES+=applications/luci-tinyproxy
996 endif
997 ifneq ($(CONFIG_PACKAGE_luci-app-initmgr),)
998        PKG_SELECTED_MODULES+=applications/luci-initmgr
999 endif
1000 ifneq ($(CONFIG_PACKAGE_luci-app-livestats),)
1001        PKG_SELECTED_MODULES+=applications/luci-livestats
1002 endif
1003 ifneq ($(CONFIG_PACKAGE_luci-app-polipo),)
1004        PKG_SELECTED_MODULES+=applications/luci-polipo
1005 endif
1006 ifneq ($(CONFIG_PACKAGE_luci-app-openvpn),)
1007        PKG_SELECTED_MODULES+=applications/luci-openvpn
1008 endif
1009 ifneq ($(CONFIG_PACKAGE_luci-app-p2pblock),)
1010        PKG_SELECTED_MODULES+=applications/luci-p2pblock
1011 endif
1012
1013
1014 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
1015         PKG_SELECTED_MODULES+=libs/sgi-cgi
1016 endif
1017 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
1018         PKG_SELECTED_MODULES+=libs/sgi-luci
1019 endif
1020
1021 ifneq ($(CONFIG_PACKAGE_luci-theme-base),)
1022         PKG_SELECTED_MODULES+=themes/base
1023 endif
1024 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
1025         PKG_SELECTED_MODULES+=themes/fledermaus
1026 endif
1027 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-bno),)
1028         PKG_SELECTED_MODULES+=themes/freifunk-bno
1029 endif
1030 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-hannover),)
1031         PKG_SELECTED_MODULES+=themes/freifunk-hannover
1032 endif
1033 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk),)
1034         PKG_SELECTED_MODULES+=themes/freifunk
1035 endif
1036 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
1037         PKG_SELECTED_MODULES+=themes/openwrt.org
1038 endif
1039 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
1040         PKG_SELECTED_MODULES+=themes/openwrt-light
1041 endif
1042
1043 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
1044         PKG_SELECTED_MODULES+=i18n/german
1045 endif
1046 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
1047         PKG_SELECTED_MODULES+=i18n/english
1048 endif
1049 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
1050         PKG_SELECTED_MODULES+=i18n/french
1051 endif
1052 ifneq ($(CONFIG_PACKAGE_luci-i18n-italian),)
1053         PKG_SELECTED_MODULES+=i18n/italian
1054 endif
1055 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
1056         PKG_SELECTED_MODULES+=i18n/russian
1057 endif
1058 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese_brazilian),)
1059         PKG_SELECTED_MODULES+=i18n/portuguese_brazilian
1060 endif
1061 ifneq ($(CONFIG_PACKAGE_luci-i18n-japanese),)
1062         PKG_SELECTED_MODULES+=i18n/japanese
1063 endif
1064 ifneq ($(CONFIG_PACKAGE_luci-i18n-greek),)
1065         PKG_SELECTED_MODULES+=i18n/greek
1066 endif
1067 ifneq ($(CONFIG_PACKAGE_luci-i18n-catalan),)
1068         PKG_SELECTED_MODULES+=i18n/catalan
1069 endif
1070 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese),)
1071         PKG_SELECTED_MODULES+=i18n/portuguese
1072 endif
1073 ifneq ($(CONFIG_PACKAGE_luci-i18n-spanish),)
1074         PKG_SELECTED_MODULES+=i18n/spanish
1075 endif
1076
1077
1078 MAKE_FLAGS += \
1079         MODULES="$(PKG_SELECTED_MODULES)" \
1080         LUA_TARGET="$(LUA_TARGET)" \
1081         LUA_SHLIBS="-llua -lm -ldl -lcrypt" \
1082         CFLAGS="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
1083         LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
1084         NIXIO_TLS="$(NIXIO_TLS)" OS="Linux"
1085
1086
1087 $(eval $(call BuildPackage,luci-core))
1088 $(eval $(call BuildPackage,luci-cbi))
1089 $(eval $(call BuildPackage,luci-fastindex))
1090 $(eval $(call BuildPackage,luci-http))
1091 $(eval $(call BuildPackage,luci-httpclient))
1092 $(eval $(call BuildPackage,luci-ipkg))
1093 $(eval $(call BuildPackage,luci-json))
1094 $(eval $(call BuildPackage,luci-lmo))
1095 $(eval $(call BuildPackage,luci-luanet))
1096 $(eval $(call BuildPackage,luci-lucid))
1097 $(eval $(call BuildPackage,luci-nixio))
1098 $(eval $(call BuildPackage,luci-px5g))
1099 $(eval $(call BuildPackage,luci-uci))
1100 $(eval $(call BuildPackage,luci-sys))
1101 $(eval $(call BuildPackage,luci-web))
1102 $(eval $(call BuildPackage,luci-uvl))
1103
1104 $(eval $(call BuildPackage,luci-admin-core))
1105 $(eval $(call BuildPackage,luci-admin-mini))
1106 $(eval $(call BuildPackage,luci-admin-full))
1107 $(eval $(call BuildPackage,luci-admin-rpc))
1108 $(eval $(call BuildPackage,luci-mod-freifunk))
1109
1110 $(eval $(call BuildPackage,luci-freifunk-community))
1111
1112 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
1113 $(eval $(call BuildPackage,luci-app-siitwizard))
1114 $(eval $(call BuildPackage,luci-app-firewall))
1115 $(eval $(call BuildPackage,luci-app-olsr))
1116 $(eval $(call BuildPackage,luci-app-qos))
1117 $(eval $(call BuildPackage,luci-app-splash))
1118 $(eval $(call BuildPackage,luci-app-statistics))
1119 $(eval $(call BuildPackage,luci-app-upnp))
1120 $(eval $(call BuildPackage,luci-app-ntpc))
1121 $(eval $(call BuildPackage,luci-app-ddns))
1122 $(eval $(call BuildPackage,luci-app-samba))
1123 $(eval $(call BuildPackage,luci-app-uvc_streamer))
1124 $(eval $(call BuildPackage,luci-app-mmc_over_gpio))
1125 $(eval $(call BuildPackage,luci-app-p910nd))
1126 $(eval $(call BuildPackage,luci-app-ushare))
1127 $(eval $(call BuildPackage,luci-app-hd_idle))
1128 $(eval $(call BuildPackage,luci-app-tinyproxy))
1129 $(eval $(call BuildPackage,luci-app-initmgr))
1130 $(eval $(call BuildPackage,luci-app-livestats))
1131 $(eval $(call BuildPackage,luci-app-polipo))
1132 $(eval $(call BuildPackage,luci-app-openvpn))
1133 $(eval $(call BuildPackage,luci-app-p2pblock))
1134
1135 $(eval $(call BuildPackage,luci-sgi-cgi))
1136
1137 $(eval $(call BuildPackage,luci-theme-base))
1138 $(eval $(call BuildPackage,luci-theme-fledermaus))
1139 $(eval $(call BuildPackage,luci-theme-freifunk))
1140 $(eval $(call BuildPackage,luci-theme-freifunk-bno))
1141 $(eval $(call BuildPackage,luci-theme-freifunk-hannover))
1142 $(eval $(call BuildPackage,luci-theme-openwrt))
1143 $(eval $(call BuildPackage,luci-theme-openwrtlight))
1144
1145 $(eval $(call BuildPackage,luci-i18n-german))
1146 $(eval $(call BuildPackage,luci-i18n-english))
1147 $(eval $(call BuildPackage,luci-i18n-french))
1148 $(eval $(call BuildPackage,luci-i18n-italian))
1149 $(eval $(call BuildPackage,luci-i18n-russian))
1150 $(eval $(call BuildPackage,luci-i18n-portuguese_brazilian))
1151 $(eval $(call BuildPackage,luci-i18n-japanese))
1152 $(eval $(call BuildPackage,luci-i18n-greek))
1153 $(eval $(call BuildPackage,luci-i18n-catalan))
1154 $(eval $(call BuildPackage,luci-i18n-portuguese))
1155 $(eval $(call BuildPackage,luci-i18n-spanish))