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