luci-0.9: merge r4952
[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-luanet
215   $(call Package/luci/libtemplate)
216   TITLE:=luanet
217   DEPENDS+=+libiw
218 endef
219
220 define Package/luci-luanet/install
221         $(call Package/luci/install/template,$(1),libs/luanet)
222 endef
223
224
225 define Package/luci-lucid
226   $(call Package/luci/libtemplate)
227   TITLE:=LuCId Superserver
228   DEPENDS+=+luci-nixio +luci-http +luci-px5g
229 endef
230
231 define Package/luci-lucid/install
232         $(call Package/luci/install/template,$(1),libs/lucid)
233         $(call Package/luci/install/template,$(1),libs/lucid-http)
234 endef
235
236
237
238 NIXIO_TLS:=axtls
239
240 define Package/luci-nixio
241   $(call Package/luci/libtemplate)
242   TITLE:=NIXIO POSIX Library
243   DEPENDS:=+PACKAGE_luci-nixio_openssl:libopenssl +PACKAGE_luci-nixio_cyassl:libcyassl-luci
244 endef
245
246 define Package/luci-nixio/install
247         $(call Package/luci/install/template,$(1),libs/nixio)
248 endef
249
250 define Package/luci-nixio/config
251         choice
252                 prompt "TLS Provider"
253                 default PACKAGE_luci-nixio_axtls
254
255                 config PACKAGE_luci-nixio_axtls
256                         bool "Builtin (axTLS)"
257
258                 config PACKAGE_luci-nixio_cyassl
259                         bool "CyaSSL"
260                         select PACKAGE_libcyassl-luci
261
262                 config PACKAGE_luci-nixio_openssl
263                         bool "OpenSSL"
264                         select PACKAGE_libopenssl
265         endchoice
266 endef
267
268 ifneq ($(CONFIG_PACKAGE_luci-nixio_openssl),)
269   NIXIO_TLS:=openssl
270 endif
271
272 ifneq ($(CONFIG_PACKAGE_luci-nixio_cyassl),)
273   NIXIO_TLS:=cyassl
274   LUCI_CFLAGS+=-I$(STAGING_DIR)/usr/include/cyassl
275 endif
276
277
278 define Package/luci-px5g
279   $(call Package/luci/libtemplate)
280   TITLE:=PX5G RSA Keymaster
281   DEPENDS:=+luci-nixio
282 endef
283
284 define Package/luci-px5g/install
285         $(call Package/luci/install/template,$(1),libs/px5g)
286 endef
287
288
289 define Package/luci-sys
290   $(call Package/luci/libtemplate)
291   TITLE:=LuCI Linux/POSIX system library
292 endef
293
294 define Package/luci-sys/install
295         $(call Package/luci/install/template,$(1),libs/sys)
296 endef
297
298
299 define Package/luci-web
300   $(call Package/luci/libtemplate)
301   DEPENDS+=+luci-http +luci-sys +luci-uci +luci-lucid +luci-sgi-cgi
302   TITLE:=MVC Webframework
303   $(call Config,luci.main.lang,string,en,Default Language)
304 endef
305
306 define Package/luci-web/conffiles
307 /etc/config/luci
308 endef
309
310 define Package/luci-web/install
311         $(call Package/luci/install/template,$(1),libs/web)
312 endef
313
314
315 define Package/luci-uvl
316   $(call Package/luci/libtemplate)
317   DEPENDS+=+luci-sys +luci-uci +luci-core
318   TITLE:=UVL - UCI Validation Layer
319 endef
320
321 define Package/luci-uvl/install
322         $(call Package/luci/install/template,$(1),libs/uvl)
323 endef
324
325
326
327 ### Community Packages ###
328
329 define Package/luci-freifunk-community
330   $(call Package/luci/fftemplate)
331   DEPENDS+= \
332    +luci-lucid +luci-sgi-cgi +luci-app-splash \
333    +luci-app-ffwizard-leipzig \
334    +luci-i18n-german \
335    +PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
336    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-txtinfo +PACKAGE_luci-freifunk-community:olsrd-luci-mod-nameservice \
337    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-watchdog +PACKAGE_luci-freifunk-community:kmod-tun \
338    +PACKAGE_luci-freifunk-community:ip +PACKAGE_luci-freifunk-community:freifunk-watchdog +luci-app-olsr
339   TITLE:=Freifunk Community Meta-Package
340 endef
341
342 define Package/luci-freifunk-community/install
343         $(call Package/luci/install/template,$(1),applications/freifunk-community)
344 endef
345
346 ### Modules ###
347
348 define Package/luci-admin-core
349   $(call Package/luci/webtemplate)
350   DEPENDS+=+luci-web +luci-cbi +luci-i18n-english
351   TITLE:=Web UI Core Module
352 endef
353
354 define Package/luci-admin-core/conffiles
355 /etc/config/luci_hosts
356 /etc/config/luci_ethers
357 endef
358
359 define Package/luci-admin-core/install
360         $(call Package/luci/install/template,$(1),modules/admin-core)
361         touch $(1)/etc/init.d/luci_fixtime || true
362 endef
363
364
365 define Package/luci-admin-mini
366   $(call Package/luci/webtemplate)
367   DEPENDS+=+luci-admin-core
368   TITLE:=LuCI Essentials - stripped down and user-friendly
369 endef
370
371 define Package/luci-admin-mini/install
372         $(call Package/luci/install/template,$(1),modules/admin-mini)
373 endef
374
375
376 define Package/luci-admin-full
377   $(call Package/luci/webtemplate)
378   DEPENDS+=+luci-admin-core +luci-ipkg
379   TITLE:=LuCI Administration - full-featured for full control
380 endef
381
382 define Package/luci-admin-full/install
383         $(call Package/luci/install/template,$(1),modules/admin-full)
384 endef
385
386
387 define Package/luci-admin-rpc
388   $(call Package/luci/webtemplate)
389   DEPENDS+=+luci-json
390   TITLE:=LuCI RPC - JSON-RPC API
391 endef
392
393 define Package/luci-admin-rpc/install
394         $(call Package/luci/install/template,$(1),modules/rpc)
395 endef
396
397
398 define Package/luci-mod-freifunk
399   $(call Package/luci/fftemplate)
400   DEPENDS:=+luci-admin-full +luci-json +PACKAGE_luci-mod-freifunk:freifunk-firewall
401   TITLE:=LuCI Freifunk module
402 endef
403
404 define Package/luci-mod-freifunk/conffiles
405 /etc/config/freifunk
406 endef
407
408 define Package/luci-mod-freifunk/install
409         $(call Package/luci/install/template,$(1),modules/freifunk)
410 endef
411
412
413
414 ### Applications ###
415
416 define Package/luci-app-ffwizard-leipzig
417   $(call Package/luci/fftemplate)
418   TITLE:=Freifunk Leipzig configuration wizard
419 endef
420
421 define Package/luci-app-ffwizard-leipzig/install
422         $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
423 endef
424
425
426 define Package/luci-app-siitwizard
427   $(call Package/luci/fftemplate)
428   TITLE:=SIIT IPv4-over-IPv6 configuration wizard
429   DEPENDS:=+luci-admin-core +PACKAGE_luci-app-siitwizard:kmod-siit
430 endef
431
432 define Package/luci-app-siitwizard/install
433         $(call Package/luci/install/template,$(1),applications/luci-siitwizard)
434 endef
435
436
437 define Package/luci-app-firewall
438   $(call Package/luci/webtemplate)
439   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-firewall:firewall
440   TITLE:=Firewall and Portforwarding application
441 endef
442
443 define Package/luci-app-firewall/install
444         $(call Package/luci/install/template,$(1),applications/luci-fw)
445 endef
446
447
448 define Package/luci-app-olsr
449   $(call Package/luci/webtemplate)
450   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-olsr:olsrd-luci \
451    +PACKAGE_luci-app-olsr:olsrd-luci-mod-txtinfo
452   TITLE:=OLSR configuration and status module
453 endef
454
455 define Package/luci-app-olsr/install
456         $(call Package/luci/install/template,$(1),applications/luci-olsr)
457 endef
458
459
460 define Package/luci-app-qos
461   $(call Package/luci/webtemplate)
462   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-qos:qos-scripts
463   TITLE:=Quality of Service configuration module
464 endef
465
466 define Package/luci-app-qos/install
467         $(call Package/luci/install/template,$(1),applications/luci-qos)
468 endef
469
470
471 define Package/luci-app-splash
472   $(call Package/luci/fftemplate)
473   DEPENDS+=+PACKAGE_luci-app-splash:luci-nixio \
474    +PACKAGE_luci-app-splash:tc +PACKAGE_luci-app-splash:kmod-sched \
475    +PACKAGE_luci-app-splash:iptables-mod-nat-extra \
476    +PACKAGE_luci-app-splash:iptables-mod-ipopt
477   TITLE:=Freifunk DHCP-Splash application
478 endef
479
480 define Package/luci-app-splash/conffiles
481 /etc/config/luci_splash
482 endef
483
484 define Package/luci-app-splash/install
485         $(call Package/luci/install/template,$(1),applications/luci-splash)
486 endef
487
488
489 define Package/luci-app-statistics
490   $(call Package/luci/webtemplate)
491   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-statistics:collectd \
492    +PACKAGE_luci-app-statistics:rrdtool1 \
493    +PACKAGE_luci-app-statistics:collectd-mod-rrdtool1 \
494    +PACKAGE_luci-app-statistics:collectd-mod-wireless \
495    +PACKAGE_luci-app-statistics:collectd-mod-interface \
496    +PACKAGE_luci-app-statistics:collectd-mod-load
497   TITLE:=LuCI Statistics Application
498 endef
499
500 define Package/luci-app-statistics/conffiles
501 /etc/config/luci_statistics
502 endef
503
504 define Package/luci-app-statistics/install
505         $(call Package/luci/install/template,$(1),applications/luci-statistics)
506 endef
507
508
509 define Package/luci-app-upnp
510   $(call Package/luci/webtemplate)
511   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-upnp:miniupnpd
512   TITLE:=Universal Plug & Play configuration module
513 endef
514
515 define Package/luci-app-upnp/install
516         $(call Package/luci/install/template,$(1),applications/luci-upnp)
517 endef
518
519
520 define Package/luci-app-ntpc
521   $(call Package/luci/webtemplate)
522   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-ntpc:ntpclient
523   TITLE:=NTP time synchronisation client configuration module
524 endef
525
526 define Package/luci-app-ntpc/install
527         $(call Package/luci/install/template,$(1),applications/luci-ntpc)
528 endef
529
530
531 define Package/luci-app-ddns
532   $(call Package/luci/webtemplate)
533   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-ddns:ddns-scripts
534   TITLE:=Dynamic DNS configuration module
535 endef
536
537 define Package/luci-app-ddns/install
538         $(call Package/luci/install/template,$(1),applications/luci-ddns)
539 endef
540
541
542 define Package/luci-app-samba
543   $(call Package/luci/webtemplate)
544   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-samba:samba3
545   TITLE:=Network Shares - Samba SMB/CIFS module
546 endef
547
548 define Package/luci-app-samba/install
549         $(call Package/luci/install/template,$(1),applications/luci-samba)
550 endef
551
552
553 define Package/luci-app-uvc_streamer
554   $(call Package/luci/webtemplate)
555   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-uvc_streamer:uvc-streamer
556   TITLE:=Webcam Streaming - UVC-Streamer module
557 endef
558
559 define Package/luci-app-uvc_streamer/install
560         $(call Package/luci/install/template,$(1),applications/luci-uvc_streamer)
561 endef
562
563
564 define Package/luci-app-mmc_over_gpio
565   $(call Package/luci/webtemplate)
566   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-mmc_over_gpio:kmod-mmc-over-gpio
567   TITLE:=mmc_over_gpio
568 endef
569
570 define Package/luci-app-mmc_over_gpio/install
571         $(call Package/luci/install/template,$(1),applications/luci-mmc_over_gpio)
572 endef
573
574
575 define Package/luci-app-p910nd
576   $(call Package/luci/webtemplate)
577   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-p910nd:p910nd
578   TITLE:=p910nd - Printer server module
579 endef
580
581 define Package/luci-app-p910nd/install
582         $(call Package/luci/install/template,$(1),applications/luci-p910nd)
583 endef
584
585
586 define Package/luci-app-ushare
587   $(call Package/luci/webtemplate)
588   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-ushare:ushare
589   TITLE:=ushare - UPnP A/V & DLNA Media Server
590 endef
591
592 define Package/luci-app-ushare/install
593         $(call Package/luci/install/template,$(1),applications/luci-ushare)
594 endef
595
596 define Package/luci-app-hd_idle
597   $(call Package/luci/webtemplate)
598   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-hd_idle:hd-idle
599   TITLE:=hd-idle
600 endef
601
602 define Package/luci-app-hd_idle/install
603         $(call Package/luci/install/template,$(1),applications/luci-hd_idle)
604 endef
605
606 define Package/luci-app-tinyproxy
607   $(call Package/luci/webtemplate)
608   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-tinyproxy:tinyproxy
609   TITLE:=Tinyproxy - HTTP(S)-Proxy
610 endef
611
612 define Package/luci-app-tinyproxy/install
613         $(call Package/luci/install/template,$(1),applications/luci-tinyproxy)
614 endef
615
616 define Package/luci-app-initmgr
617   $(call Package/luci/webtemplate)
618   DEPENDS+=+luci-admin-full
619   TITLE:=LuCI Initscript Management
620 endef
621
622 define Package/luci-app-initmgr/install
623         $(call Package/luci/install/template,$(1),applications/luci-initmgr)
624 endef
625
626 define Package/luci-app-livestats
627   $(call Package/luci/webtemplate)
628   DEPENDS+=+luci-admin-core +luci-admin-rpc
629   TITLE:=LuCI Realtime Statistics
630 endef
631
632 define Package/luci-app-livestats/install
633         $(call Package/luci/install/template,$(1),applications/luci-livestats)
634 endef
635
636 define Package/luci-app-polipo
637   $(call Package/luci/webtemplate)
638   TITLE:=LuCI Support for the Polipo Proxy
639   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-polipo:polipo
640 endef
641
642 define Package/luci-app-polipo/install
643         $(call Package/luci/install/template,$(1),applications/luci-polipo)
644 endef
645
646 define Package/luci-app-openvpn
647   $(call Package/luci/webtemplate)
648   TITLE:=LuCI Support for OpenVPN
649   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-openvpn:openvpn
650 endef
651
652 define Package/luci-app-openvpn/install
653         $(call Package/luci/install/template,$(1),applications/luci-openvpn)
654 endef
655
656 define Package/luci-app-p2pblock
657   $(call Package/luci/webtemplate)
658   TITLE:=LuCI Support for the Freifunk P2P-Block addon
659   DEPENDS+=+luci-admin-core +luci-app-firewall \
660     +PACKAGE_luci-app-p2pblock:freifunk-p2pblock
661 endef
662
663 define Package/luci-app-p2pblock/install
664         $(call Package/luci/install/template,$(1),applications/luci-p2pblock)
665 endef
666
667
668 ### Server Gateway Interfaces ###
669
670 define Package/luci-sgi-cgi
671   $(call Package/luci/libtemplate)
672   TITLE:=SGI for CGI
673 endef
674
675 define Package/luci-sgi-cgi/install
676         $(call Package/luci/install/template,$(1),libs/sgi-cgi)
677 endef
678
679 ### Themes ###
680 define Package/luci-theme-base
681   $(call Package/luci/thtemplate)
682   DEPENDS:=+luci-web
683   TITLE:=Common base for all themes
684 endef
685
686 define Package/luci-theme-base/install
687         $(call Package/luci/install/template,$(1),themes/base)
688 endef
689
690 define Package/luci-theme-fledermaus
691   $(call Package/luci/fftemplate)
692   DEPENDS:=+luci-web
693   TITLE:=Fledermaus Theme
694 endef
695
696 define Package/luci-theme-fledermaus/install
697         $(call Package/luci/install/template,$(1),themes/fledermaus)
698 endef
699
700 define Package/luci-theme-freifunk
701   $(call Package/luci/fftemplate)
702   DEPENDS:=+luci-web
703   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
704   TITLE:=alternative Freifunk Theme
705 endef
706
707 define Package/luci-theme-freifunk/install
708         $(call Package/luci/install/template,$(1),themes/freifunk)
709 endef
710
711 define Package/luci-theme-freifunk-bno
712   $(call Package/luci/fftemplate)
713   DEPENDS:=+luci-web
714   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
715   TITLE:=Freifunk Berlin Nordost Theme
716 endef
717
718 define Package/luci-theme-freifunk-bno/install
719         $(call Package/luci/install/template,$(1),themes/freifunk-bno)
720 endef
721
722 define Package/luci-theme-freifunk-hannover
723   $(call Package/luci/fftemplate)
724   DEPENDS:=+luci-web
725   MAINTAINER:=Mikolas Bingemer <mickey-at-freifunk-hannover-dot-de>
726   TITLE:=Freifunk Hannover Theme
727 endef
728
729 define Package/luci-theme-freifunk-hannover/install
730         $(call Package/luci/install/template,$(1),themes/freifunk-hannover)
731 endef
732
733 define Package/luci-theme-openwrt
734   $(call Package/luci/thtemplate)
735   TITLE:=OpenWrt.org (default)
736   DEPENDS:=+luci-theme-base
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 ### Compile ###
856 ifneq ($(CONFIG_PACKAGE_luci-core),)
857         PKG_SELECTED_MODULES+=libs/core
858 endif
859 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
860         PKG_SELECTED_MODULES+=libs/cbi
861 endif
862 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
863         PKG_SELECTED_MODULES+=libs/fastindex
864 endif
865 ifneq ($(CONFIG_PACKAGE_luci-http),)
866         PKG_SELECTED_MODULES+=libs/http
867 endif
868 ifneq ($(CONFIG_PACKAGE_luci-httpclient),)
869         PKG_SELECTED_MODULES+=libs/httpclient
870 endif
871 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
872         PKG_SELECTED_MODULES+=libs/ipkg
873 endif
874 ifneq ($(CONFIG_PACKAGE_luci-json),)
875         PKG_SELECTED_MODULES+=libs/json
876 endif
877 ifneq ($(CONFIG_PACKAGE_luci-luanet),)
878         PKG_SELECTED_MODULES+=libs/luanet
879 endif
880 ifneq ($(CONFIG_PACKAGE_luci-lucid),)
881         PKG_SELECTED_MODULES+=libs/lucid libs/lucid-http
882 endif
883 ifneq ($(CONFIG_PACKAGE_luci-nixio),)
884         PKG_SELECTED_MODULES+=libs/nixio
885 endif
886 ifneq ($(CONFIG_PACKAGE_luci-px5g),)
887         PKG_SELECTED_MODULES+=libs/px5g
888 endif
889 ifneq ($(CONFIG_PACKAGE_luci-uci),)
890         PKG_SELECTED_MODULES+=libs/uci
891 endif
892 ifneq ($(CONFIG_PACKAGE_luci-sys),)
893         PKG_SELECTED_MODULES+=libs/sys
894 endif
895 ifneq ($(CONFIG_PACKAGE_luci-web),)
896         PKG_SELECTED_MODULES+=libs/web
897 endif
898 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
899         PKG_SELECTED_MODULES+=libs/uvl
900 endif
901
902 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
903         PKG_SELECTED_MODULES+=modules/admin-core
904 endif
905 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
906         PKG_SELECTED_MODULES+=modules/admin-mini
907 endif
908 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
909         PKG_SELECTED_MODULES+=modules/admin-full
910 endif
911 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
912         PKG_SELECTED_MODULES+=modules/rpc
913 endif
914 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
915         PKG_SELECTED_MODULES+=modules/freifunk
916 endif
917
918 ifneq ($(CONFIG_PACKAGE_luci-freifunk-community),)
919         PKG_SELECTED_MODULES+=applications/freifunk-community
920 endif
921
922 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
923         PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
924 endif
925 ifneq ($(CONFIG_PACKAGE_luci-app-siitwizard),)
926         PKG_SELECTED_MODULES+=applications/luci-siitwizard
927 endif
928 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
929         PKG_SELECTED_MODULES+=applications/luci-fw
930 endif
931 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
932         PKG_SELECTED_MODULES+=applications/luci-olsr
933 endif
934 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
935         PKG_SELECTED_MODULES+=applications/luci-qos
936 endif
937 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
938         PKG_SELECTED_MODULES+=applications/luci-splash
939 endif
940 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
941         PKG_SELECTED_MODULES+=applications/luci-statistics
942 endif
943 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
944         PKG_SELECTED_MODULES+=applications/luci-upnp
945 endif
946 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
947         PKG_SELECTED_MODULES+=applications/luci-ntpc
948 endif
949 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
950         PKG_SELECTED_MODULES+=applications/luci-ddns
951 endif
952 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
953         PKG_SELECTED_MODULES+=applications/luci-samba
954 endif
955 ifneq ($(CONFIG_PACKAGE_luci-app-uvc_streamer),)
956         PKG_SELECTED_MODULES+=applications/luci-uvc_streamer
957 endif
958 ifneq ($(CONFIG_PACKAGE_luci-app-mmc_over_gpio),)
959         PKG_SELECTED_MODULES+=applications/luci-mmc_over_gpio
960 endif
961 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
962         PKG_SELECTED_MODULES+=applications/luci-p910nd
963 endif
964 ifneq ($(CONFIG_PACKAGE_luci-app-ushare),)
965         PKG_SELECTED_MODULES+=applications/luci-ushare
966 endif
967 ifneq ($(CONFIG_PACKAGE_luci-app-hd_idle),)
968        PKG_SELECTED_MODULES+=applications/luci-hd_idle
969 endif
970 ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),)
971        PKG_SELECTED_MODULES+=applications/luci-tinyproxy
972 endif
973 ifneq ($(CONFIG_PACKAGE_luci-app-initmgr),)
974        PKG_SELECTED_MODULES+=applications/luci-initmgr
975 endif
976 ifneq ($(CONFIG_PACKAGE_luci-app-livestats),)
977        PKG_SELECTED_MODULES+=applications/luci-livestats
978 endif
979 ifneq ($(CONFIG_PACKAGE_luci-app-polipo),)
980        PKG_SELECTED_MODULES+=applications/luci-polipo
981 endif
982 ifneq ($(CONFIG_PACKAGE_luci-app-openvpn),)
983        PKG_SELECTED_MODULES+=applications/luci-openvpn
984 endif
985 ifneq ($(CONFIG_PACKAGE_luci-app-p2pblock),)
986        PKG_SELECTED_MODULES+=applications/luci-p2pblock
987 endif
988
989
990 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
991         PKG_SELECTED_MODULES+=libs/sgi-cgi
992 endif
993 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
994         PKG_SELECTED_MODULES+=libs/sgi-luci
995 endif
996
997 ifneq ($(CONFIG_PACKAGE_luci-theme-base),)
998         PKG_SELECTED_MODULES+=themes/base
999 endif
1000 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
1001         PKG_SELECTED_MODULES+=themes/fledermaus
1002 endif
1003 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-bno),)
1004         PKG_SELECTED_MODULES+=themes/freifunk-bno
1005 endif
1006 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-hannover),)
1007         PKG_SELECTED_MODULES+=themes/freifunk-hannover
1008 endif
1009 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk),)
1010         PKG_SELECTED_MODULES+=themes/freifunk
1011 endif
1012 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
1013         PKG_SELECTED_MODULES+=themes/openwrt.org
1014 endif
1015 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
1016         PKG_SELECTED_MODULES+=themes/openwrt-light
1017 endif
1018
1019 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
1020         PKG_SELECTED_MODULES+=i18n/german
1021 endif
1022 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
1023         PKG_SELECTED_MODULES+=i18n/english
1024 endif
1025 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
1026         PKG_SELECTED_MODULES+=i18n/french
1027 endif
1028 ifneq ($(CONFIG_PACKAGE_luci-i18n-italian),)
1029         PKG_SELECTED_MODULES+=i18n/italian
1030 endif
1031 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
1032         PKG_SELECTED_MODULES+=i18n/russian
1033 endif
1034 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese_brazilian),)
1035         PKG_SELECTED_MODULES+=i18n/portuguese_brazilian
1036 endif
1037 ifneq ($(CONFIG_PACKAGE_luci-i18n-japanese),)
1038         PKG_SELECTED_MODULES+=i18n/japanese
1039 endif
1040 ifneq ($(CONFIG_PACKAGE_luci-i18n-greek),)
1041         PKG_SELECTED_MODULES+=i18n/greek
1042 endif
1043 ifneq ($(CONFIG_PACKAGE_luci-i18n-catalan),)
1044         PKG_SELECTED_MODULES+=i18n/catalan
1045 endif
1046 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese),)
1047         PKG_SELECTED_MODULES+=i18n/portuguese
1048 endif
1049
1050
1051 MAKE_FLAGS += \
1052         MODULES="$(PKG_SELECTED_MODULES)" \
1053         LUA_TARGET="$(LUA_TARGET)" \
1054         LUA_SHLIBS="-llua -lm -ldl -lcrypt" \
1055         CFLAGS="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
1056         LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
1057         NIXIO_TLS="$(NIXIO_TLS)" OS="Linux"
1058
1059
1060 $(eval $(call BuildPackage,luci-core))
1061 $(eval $(call BuildPackage,luci-cbi))
1062 $(eval $(call BuildPackage,luci-fastindex))
1063 $(eval $(call BuildPackage,luci-http))
1064 $(eval $(call BuildPackage,luci-httpclient))
1065 $(eval $(call BuildPackage,luci-ipkg))
1066 $(eval $(call BuildPackage,luci-json))
1067 $(eval $(call BuildPackage,luci-luanet))
1068 $(eval $(call BuildPackage,luci-lucid))
1069 $(eval $(call BuildPackage,luci-nixio))
1070 $(eval $(call BuildPackage,luci-px5g))
1071 $(eval $(call BuildPackage,luci-uci))
1072 $(eval $(call BuildPackage,luci-sys))
1073 $(eval $(call BuildPackage,luci-web))
1074 $(eval $(call BuildPackage,luci-uvl))
1075
1076 $(eval $(call BuildPackage,luci-admin-core))
1077 $(eval $(call BuildPackage,luci-admin-mini))
1078 $(eval $(call BuildPackage,luci-admin-full))
1079 $(eval $(call BuildPackage,luci-admin-rpc))
1080 $(eval $(call BuildPackage,luci-mod-freifunk))
1081
1082 $(eval $(call BuildPackage,luci-freifunk-community))
1083
1084 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
1085 $(eval $(call BuildPackage,luci-app-siitwizard))
1086 $(eval $(call BuildPackage,luci-app-firewall))
1087 $(eval $(call BuildPackage,luci-app-olsr))
1088 $(eval $(call BuildPackage,luci-app-qos))
1089 $(eval $(call BuildPackage,luci-app-splash))
1090 $(eval $(call BuildPackage,luci-app-statistics))
1091 $(eval $(call BuildPackage,luci-app-upnp))
1092 $(eval $(call BuildPackage,luci-app-ntpc))
1093 $(eval $(call BuildPackage,luci-app-ddns))
1094 $(eval $(call BuildPackage,luci-app-samba))
1095 $(eval $(call BuildPackage,luci-app-uvc_streamer))
1096 $(eval $(call BuildPackage,luci-app-mmc_over_gpio))
1097 $(eval $(call BuildPackage,luci-app-p910nd))
1098 $(eval $(call BuildPackage,luci-app-ushare))
1099 $(eval $(call BuildPackage,luci-app-hd_idle))
1100 $(eval $(call BuildPackage,luci-app-tinyproxy))
1101 $(eval $(call BuildPackage,luci-app-initmgr))
1102 $(eval $(call BuildPackage,luci-app-livestats))
1103 $(eval $(call BuildPackage,luci-app-polipo))
1104 $(eval $(call BuildPackage,luci-app-openvpn))
1105 $(eval $(call BuildPackage,luci-app-p2pblock))
1106
1107 $(eval $(call BuildPackage,luci-sgi-cgi))
1108
1109 $(eval $(call BuildPackage,luci-theme-base))
1110 $(eval $(call BuildPackage,luci-theme-fledermaus))
1111 $(eval $(call BuildPackage,luci-theme-freifunk))
1112 $(eval $(call BuildPackage,luci-theme-freifunk-bno))
1113 $(eval $(call BuildPackage,luci-theme-freifunk-hannover))
1114 $(eval $(call BuildPackage,luci-theme-openwrt))
1115 $(eval $(call BuildPackage,luci-theme-openwrtlight))
1116
1117 $(eval $(call BuildPackage,luci-i18n-german))
1118 $(eval $(call BuildPackage,luci-i18n-english))
1119 $(eval $(call BuildPackage,luci-i18n-french))
1120 $(eval $(call BuildPackage,luci-i18n-italian))
1121 $(eval $(call BuildPackage,luci-i18n-russian))
1122 $(eval $(call BuildPackage,luci-i18n-portuguese_brazilian))
1123 $(eval $(call BuildPackage,luci-i18n-japanese))
1124 $(eval $(call BuildPackage,luci-i18n-greek))
1125 $(eval $(call BuildPackage,luci-i18n-catalan))
1126 $(eval $(call BuildPackage,luci-i18n-portuguese))