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