Add Makefile definitions for http-client
[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 ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //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 PKG_BUILD_DEPENDS:=libnotimpl
30 LUA_TARGET:=source
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        endchoice
131 endef
132
133 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
134   LUA_TARGET:=compile
135 endif
136
137 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
138   LUA_TARGET:=strip
139 endif
140
141
142 ### Libraries ###
143 define Package/luci-cbi
144   $(call Package/luci/libtemplate)
145   DEPENDS+=+luci-web +luci-uvl +luci-uci
146   TITLE:=Configuration Binding Interface
147 endef
148
149 define Package/luci-cbi/install
150         $(call Package/luci/install/template,$(1),libs/cbi)
151 endef
152
153
154 define Package/luci-uci
155   $(call Package/luci/libtemplate)
156   DEPENDS+=+libuci-lua
157   TITLE:=High-Level UCI API
158 endef
159
160 define Package/luci-uci/install
161         $(call Package/luci/install/template,$(1),libs/uci)
162 endef
163
164
165 define Package/luci-fastindex
166   $(call Package/luci/libtemplate)
167   TITLE:=Fastindex indexing module
168 endef
169
170 define Package/luci-fastindex/install
171         $(call Package/luci/install/template,$(1),libs/fastindex)
172 endef
173
174
175 define Package/luci-http
176   $(call Package/luci/libtemplate)
177   TITLE:=HTTP Protocol implementation
178 endef
179
180 define Package/luci-http/install
181         $(call Package/luci/install/template,$(1),libs/http)
182 endef
183
184
185 define Package/luci-httpclient
186   $(call Package/luci/libtemplate)
187   TITLE:=HTTP(S) client library
188   DEPENDS+=+luci-http +luci-nixio
189 endef
190
191 define Package/luci-httpclient/install
192         $(call Package/luci/install/template,$(1),libs/httpclient)
193 endef
194
195
196 define Package/luci-ipkg
197   $(call Package/luci/libtemplate)
198   TITLE:=LuCI IPKG/OPKG call abstraction library
199 endef
200
201 define Package/luci-ipkg/install
202         $(call Package/luci/install/template,$(1),libs/ipkg)
203 endef
204
205
206 define Package/luci-json
207   $(call Package/luci/libtemplate)
208   TITLE:=LuCI JSON Library
209 endef
210
211 define Package/luci-json/install
212         $(call Package/luci/install/template,$(1),libs/json)
213 endef
214
215
216 define Package/luci-nixio
217   $(call Package/luci/libtemplate)
218   TITLE:=NIXIO Socket Library
219 endef
220
221 define Package/luci-nixio/install
222         $(call Package/luci/install/template,$(1),libs/nixio)
223 endef
224
225
226 define Package/luci-sys
227   $(call Package/luci/libtemplate)
228   TITLE:=LuCI Linux/POSIX system library
229 endef
230
231 define Package/luci-sys/install
232         $(call Package/luci/install/template,$(1),libs/sys)
233 endef
234
235
236 define Package/luci-web
237   $(call Package/luci/libtemplate)
238   DEPENDS+=+luci-http +luci-sys +luci-uci +luci-sgi-cgi
239   TITLE:=MVC Webframework
240   $(call Config,luci.main.lang,string,en,Default Language)
241 endef
242
243 define Package/luci-web/conffiles
244 /etc/config/luci
245 endef
246
247 define Package/luci-web/install
248         $(call Package/luci/install/template,$(1),libs/web)
249 endef
250
251
252 define Package/luci-uvl
253   $(call Package/luci/libtemplate)
254   DEPENDS+=+luci-sys +luci-uci +luci-core
255   TITLE:=UVL - UCI Validation Layer
256 endef
257
258 define Package/luci-uvl/install
259         $(call Package/luci/install/template,$(1),libs/uvl)
260 endef
261
262
263
264 ### HTTPD ###
265
266 define Package/luci-httpd
267   $(call Package/luci/httpdtemplate)
268   DEPENDS:=+luci-http +libuci
269   TITLE:=Server Core
270 endef
271
272 define Package/luci-httpd/install
273         $(call Package/luci/install/template,$(1),libs/lucittpd)
274 endef
275
276
277
278 ### Community Packages ###
279
280 define Package/luci-freifunk-community
281   $(call Package/luci/fftemplate)
282   DEPENDS+= \
283    +luci-sgi-cgi +luci-app-splash \
284    +luci-app-ffwizard-leipzig \
285    +luci-i18n-german \
286    +PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
287    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-txtinfo +PACKAGE_luci-freifunk-community:olsrd-luci-mod-nameservice \
288    +PACKAGE_luci-freifunk-community:kmod-tun +PACKAGE_luci-freifunk-community:ip \
289    +luci-app-olsr
290   TITLE:=Freifunk Community Meta-Package
291 endef
292
293 define Package/luci-freifunk-community/install
294         $(call Package/luci/install/template,$(1),applications/freifunk-community)
295 endef
296
297 ### Modules ###
298
299 define Package/luci-admin-core
300   $(call Package/luci/webtemplate)
301   DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
302   TITLE:=Web UI Core Module
303 endef
304
305 define Package/luci-admin-core/conffiles
306 /etc/config/luci_hosts
307 /etc/config/luci_ethers
308 endef
309
310 define Package/luci-admin-core/install
311         $(call Package/luci/install/template,$(1),modules/admin-core)
312         touch $(1)/etc/init.d/luci_fixtime || true
313 endef
314
315
316 define Package/luci-admin-mini
317   $(call Package/luci/webtemplate)
318   DEPENDS+=+luci-admin-core
319   TITLE:=LuCI Essentials - stripped down and user-friendly
320 endef
321
322 define Package/luci-admin-mini/install
323         $(call Package/luci/install/template,$(1),modules/admin-mini)
324 endef
325
326
327 define Package/luci-admin-full
328   $(call Package/luci/webtemplate)
329   DEPENDS+=+luci-admin-core +luci-ipkg
330   TITLE:=LuCI Administration - full-featured for full control
331 endef
332
333 define Package/luci-admin-full/install
334         $(call Package/luci/install/template,$(1),modules/admin-full)
335 endef
336
337
338 define Package/luci-admin-rpc
339   $(call Package/luci/webtemplate)
340   DEPENDS+=+luci-json
341   TITLE:=LuCI RPC - JSON-RPC API
342 endef
343
344 define Package/luci-admin-rpc/install
345         $(call Package/luci/install/template,$(1),modules/rpc)
346 endef
347
348
349 define Package/luci-mod-freifunk
350   $(call Package/luci/fftemplate)
351   DEPENDS:=+luci-admin-full +luci-json
352   TITLE:=LuCI Freifunk module
353 endef
354
355 define Package/luci-mod-freifunk/conffiles
356 /etc/config/freifunk
357 endef
358
359 define Package/luci-mod-freifunk/install
360         $(call Package/luci/install/template,$(1),modules/freifunk)
361 endef
362
363
364
365 ### Applications ###
366
367 define Package/luci-app-ffwizard-leipzig
368   $(call Package/luci/fftemplate)
369   TITLE:=Freifunk Leipzig configuration wizard
370 endef
371
372 define Package/luci-app-ffwizard-leipzig/install
373         $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
374 endef
375
376
377 define Package/luci-app-siitwizard
378   $(call Package/luci/fftemplate)
379   TITLE:=SIIT IPv4-over-IPv6 configuration wizard
380   DEPENDS:=+luci-admin-core +PACKAGE_luci-app-siitwizard:kmod-siit
381 endef
382
383 define Package/luci-app-siitwizard/install
384         $(call Package/luci/install/template,$(1),applications/luci-siitwizard)
385 endef
386
387
388 define Package/luci-app-firewall
389   $(call Package/luci/webtemplate)
390   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-firewall:firewall
391   TITLE:=Firewall and Portforwarding application
392 endef
393
394 define Package/luci-app-firewall/install
395         $(call Package/luci/install/template,$(1),applications/luci-fw)
396 endef
397
398
399 define Package/luci-app-olsr
400   $(call Package/luci/webtemplate)
401   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-olsr:olsrd-luci +PACKAGE_luci-app-olsr:olsrd-luci-mod-txtinfo
402   TITLE:=OLSR configuration and status module
403 endef
404
405 define Package/luci-app-olsr/install
406         $(call Package/luci/install/template,$(1),applications/luci-olsr)
407 endef
408
409
410 define Package/luci-app-qos
411   $(call Package/luci/webtemplate)
412   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-qos:qos-scripts
413   TITLE:=Quality of Service configuration module
414 endef
415
416 define Package/luci-app-qos/install
417         $(call Package/luci/install/template,$(1),applications/luci-qos)
418 endef
419
420
421 define Package/luci-app-splash
422   $(call Package/luci/fftemplate)
423   DEPENDS+=+PACKAGE_luci-app-splash:luasocket
424   TITLE:=Freifunk DHCP-Splash application
425 endef
426
427 define Package/luci-app-splash/conffiles
428 /etc/config/luci_splash
429 endef
430
431 define Package/luci-app-splash/install
432         $(call Package/luci/install/template,$(1),applications/luci-splash)
433 endef
434
435
436 define Package/luci-app-statistics
437   $(call Package/luci/webtemplate)
438   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-statistics:collectd \
439    +PACKAGE_luci-app-statistics:rrdtool1 \
440    +PACKAGE_luci-app-statistics:collectd-mod-rrdtool1 \
441    +PACKAGE_luci-app-statistics:collectd-mod-wireless \
442    +PACKAGE_luci-app-statistics:collectd-mod-interfaces \
443    +PACKAGE_luci-app-statistics:collectd-mod-load
444   TITLE:=LuCI Statistics Application
445 endef
446
447 define Package/luci-app-statistics/conffiles
448 /etc/config/luci_statistics
449 endef
450
451 define Package/luci-app-statistics/install
452         $(call Package/luci/install/template,$(1),applications/luci-statistics)
453 endef
454
455
456 define Package/luci-app-upnp
457   $(call Package/luci/webtemplate)
458   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-upnp:miniupnpd
459   TITLE:=Universal Plug & Play configuration module
460 endef
461
462 define Package/luci-app-upnp/install
463         $(call Package/luci/install/template,$(1),applications/luci-upnp)
464 endef
465
466
467 define Package/luci-app-ntpc
468   $(call Package/luci/webtemplate)
469   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-ntpc:ntpclient
470   TITLE:=NTP time synchronisation client configuration module
471 endef
472
473 define Package/luci-app-ntpc/install
474         $(call Package/luci/install/template,$(1),applications/luci-ntpc)
475 endef
476
477
478 define Package/luci-app-ddns
479   $(call Package/luci/webtemplate)
480   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-ddns:ddns-scripts
481   TITLE:=Dynamic DNS configuration module
482 endef
483
484 define Package/luci-app-ddns/install
485         $(call Package/luci/install/template,$(1),applications/luci-ddns)
486 endef
487
488
489 define Package/luci-app-samba
490   $(call Package/luci/webtemplate)
491   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-samba:samba3
492   TITLE:=Network Shares - Samba SMB/CIFS module
493 endef
494
495 define Package/luci-app-samba/install
496         $(call Package/luci/install/template,$(1),applications/luci-samba)
497 endef
498
499
500 define Package/luci-app-uvc_streamer
501   $(call Package/luci/webtemplate)
502   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-uvc_streamer:uvc-streamer
503   TITLE:=Webcam Streaming - UVC-Streamer module
504 endef
505
506 define Package/luci-app-uvc_streamer/install
507         $(call Package/luci/install/template,$(1),applications/luci-uvc_streamer)
508 endef
509
510
511 define Package/luci-app-mmc_over_gpio
512   $(call Package/luci/webtemplate)
513   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-mmc_over_gpio:kmod-mmc-over-gpio
514   TITLE:=mmc_over_gpio
515 endef
516
517 define Package/luci-app-mmc_over_gpio/install
518         $(call Package/luci/install/template,$(1),applications/luci-mmc_over_gpio)
519 endef
520
521
522 define Package/luci-app-p910nd
523   $(call Package/luci/webtemplate)
524   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-p910nd:p910nd
525   TITLE:=p910nd - Printer server module
526 endef
527
528 define Package/luci-app-p910nd/install
529         $(call Package/luci/install/template,$(1),applications/luci-p910nd)
530 endef
531
532
533 define Package/luci-app-ushare
534   $(call Package/luci/webtemplate)
535   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-ushare:ushare
536   TITLE:=ushare - UPnP A/V & DLNA Media Server
537 endef
538
539 define Package/luci-app-ushare/install
540         $(call Package/luci/install/template,$(1),applications/luci-ushare)
541 endef
542
543 define Package/luci-app-hd_idle
544   $(call Package/luci/webtemplate)
545   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-hd_idle:hd-idle
546   TITLE:=hd-idle
547 endef
548
549 define Package/luci-app-hd_idle/install
550         $(call Package/luci/install/template,$(1),applications/luci-hd_idle)
551 endef
552
553 define Package/luci-app-tinyproxy
554   $(call Package/luci/webtemplate)
555   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-tinyproxy:tinyproxy
556   TITLE:=Tinyproxy - HTTP(S)-Proxy
557 endef
558
559 define Package/luci-app-tinyproxy/install
560         $(call Package/luci/install/template,$(1),applications/luci-tinyproxy)
561 endef
562
563 define Package/luci-app-initmgr
564   $(call Package/luci/webtemplate)
565   DEPENDS+=+luci-admin-full
566   TITLE:=LuCI Initscript Management
567 endef
568
569 define Package/luci-app-initmgr/install
570         $(call Package/luci/install/template,$(1),applications/luci-initmgr)
571 endef
572
573 define Package/luci-app-livestats
574   $(call Package/luci/webtemplate)
575   DEPENDS+=+luci-admin-core +luci-admin-rpc
576   TITLE:=LuCI Realtime Statistics
577 endef
578
579 define Package/luci-app-livestats/install
580         $(call Package/luci/install/template,$(1),applications/luci-livestats)
581 endef
582
583 define Package/luci-app-asterisk
584   $(call Package/luci/webtemplate)
585   TITLE:=LuCI Support for Asterisk PBX
586   DEPENDS+=@BROKEN +luci-admin-core +PACKAGE_luci-app-asterisk:asterisk14-xip-core
587 endef
588
589 define Package/luci-app-asterisk/install
590         $(call Package/luci/install/template,$(1),applications/luci-asterisk)
591 endef
592
593 define Package/luci-app-polipo
594   $(call Package/luci/webtemplate)
595   TITLE:=LuCI Support for the Polipo Proxy
596   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-polipo:polipo
597 endef
598
599 define Package/luci-app-polipo/install
600         $(call Package/luci/install/template,$(1),applications/luci-polipo)
601 endef
602
603 define Package/luci-app-openvpn
604   $(call Package/luci/webtemplate)
605   TITLE:=LuCI Support for OpenVPN
606   DEPENDS+=@BROKEN +luci-admin-core +PACKAGE_luci-app-openvpn:openvpn
607 endef
608
609 define Package/luci-app-openvpn/install
610         $(call Package/luci/install/template,$(1),applications/luci-openvpn)
611 endef
612
613
614 ### Server Gateway Interfaces ###
615
616 define Package/luci-sgi-cgi
617   $(call Package/luci/libtemplate)
618   TITLE:=SGI for CGI
619 endef
620
621 define Package/luci-sgi-cgi/install
622         $(call Package/luci/install/template,$(1),libs/sgi-cgi)
623 endef
624
625 define Package/luci-sgi-luci
626   $(call Package/luci/libtemplate)
627   DEPENDS+=+luci-httpd
628   TITLE:=SGI for LuCIttpd
629 endef
630
631 define Package/luci-sgi-luci/install
632         $(call Package/luci/install/template,$(1),libs/sgi-luci)
633 endef
634
635 define Package/luci-sgi-webuci
636   $(call Package/luci/libtemplate)
637   TITLE:=SGI for Webuci
638 endef
639
640 define Package/luci-sgi-webuci/install
641         $(call Package/luci/install/template,$(1),libs/sgi-webuci)
642 endef
643
644 ### Themes ###
645 define Package/luci-theme-base
646   $(call Package/luci/thtemplate)
647   DEPENDS:=+luci-web
648   TITLE:=Common base for all themes
649 endef
650
651 define Package/luci-theme-base/install
652         $(call Package/luci/install/template,$(1),themes/base)
653 endef
654
655 define Package/luci-theme-fledermaus
656   $(call Package/luci/fftemplate)
657   DEPENDS:=+luci-web
658   TITLE:=Fledermaus Theme
659 endef
660
661 define Package/luci-theme-fledermaus/install
662         $(call Package/luci/install/template,$(1),themes/fledermaus)
663 endef
664
665 define Package/luci-theme-freifunk
666   $(call Package/luci/fftemplate)
667   DEPENDS:=+luci-web
668   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
669   TITLE:=alternative Freifunk Theme
670 endef
671
672 define Package/luci-theme-freifunk/install
673         $(call Package/luci/install/template,$(1),themes/freifunk)
674 endef
675
676 define Package/luci-theme-freifunk-bno
677   $(call Package/luci/fftemplate)
678   DEPENDS:=+luci-web
679   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
680   TITLE:=Freifunk Berlin Nordost Theme
681 endef
682
683 define Package/luci-theme-freifunk-bno/install
684         $(call Package/luci/install/template,$(1),themes/freifunk-bno)
685 endef
686
687 define Package/luci-theme-openwrt
688   $(call Package/luci/thtemplate)
689   TITLE:=OpenWrt.org (default)
690   DEPENDS:=+luci-theme-base
691 endef
692
693 define Package/luci-theme-openwrt/install
694         $(call Package/luci/install/template,$(1),themes/openwrt.org)
695 endef
696
697 define Package/luci-theme-openwrtlight
698   $(call Package/luci/thtemplate)
699   TITLE:=OpenWrt.org - light variant without images
700   DEPENDS:=+luci-theme-base
701 endef
702
703 define Package/luci-theme-openwrtlight/install
704         $(call Package/luci/install/template,$(1),themes/openwrt-light)
705 endef
706
707
708 ### Translations ###
709 define Package/luci-i18n-german
710   $(call Package/luci/i18ntemplate)
711   TITLE:=German
712 endef
713
714 define Package/luci-i18n-german/install
715         $(call Package/luci/install/template,$(1),i18n/german)
716 endef
717
718
719 define Package/luci-i18n-english
720   $(call Package/luci/i18ntemplate)
721   TITLE:=English
722 endef
723
724 define Package/luci-i18n-english/install
725         $(call Package/luci/install/template,$(1),i18n/english)
726 endef
727
728
729 define Package/luci-i18n-french
730   $(call Package/luci/i18ntemplate)
731   TITLE:=French (by Florian Fainelli)
732 endef
733
734 define Package/luci-i18n-french/install
735         $(call Package/luci/install/template,$(1),i18n/french)
736 endef
737
738
739 define Package/luci-i18n-italian
740   $(call Package/luci/i18ntemplate)
741   TITLE:=Italian (by Matteo Croce)
742 endef
743
744 define Package/luci-i18n-italian/install
745         $(call Package/luci/install/template,$(1),i18n/italian)
746 endef
747
748
749 define Package/luci-i18n-russian
750   $(call Package/luci/i18ntemplate)
751   TITLE:=Russian (by Skryabin Dmitry)
752 endef
753
754 define Package/luci-i18n-russian/install
755         $(call Package/luci/install/template,$(1),i18n/russian)
756 endef
757
758
759 define Package/luci-i18n-portuguese_brazilian
760   $(call Package/luci/i18ntemplate)
761   TITLE:=Portuguese (Brazilian) (by Carlos Cesario)
762 endef
763
764 define Package/luci-i18n-portuguese_brazilian/install
765         $(call Package/luci/install/template,$(1),i18n/portuguese_brazilian)
766 endef
767
768
769 ### Compile ###
770 ifneq ($(CONFIG_PACKAGE_luci-core),)
771         PKG_SELECTED_MODULES+=libs/core
772 endif
773 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
774         PKG_SELECTED_MODULES+=libs/cbi
775 endif
776 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
777         PKG_SELECTED_MODULES+=libs/fastindex
778 endif
779 ifneq ($(CONFIG_PACKAGE_luci-http),)
780         PKG_SELECTED_MODULES+=libs/http
781 endif
782 ifneq ($(CONFIG_PACKAGE_luci-httpclient),)
783         PKG_SELECTED_MODULES+=libs/httpclient
784 endif
785 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
786         PKG_SELECTED_MODULES+=libs/ipkg
787 endif
788 ifneq ($(CONFIG_PACKAGE_luci-json),)
789         PKG_SELECTED_MODULES+=libs/json
790 endif
791 ifneq ($(CONFIG_PACKAGE_luci-nixio),)
792         PKG_SELECTED_MODULES+=libs/nixio
793 endif
794 ifneq ($(CONFIG_PACKAGE_luci-uci),)
795         PKG_SELECTED_MODULES+=libs/uci
796 endif
797 ifneq ($(CONFIG_PACKAGE_luci-sys),)
798         PKG_SELECTED_MODULES+=libs/sys
799 endif
800 ifneq ($(CONFIG_PACKAGE_luci-web),)
801         PKG_SELECTED_MODULES+=libs/web
802 endif
803 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
804         PKG_SELECTED_MODULES+=libs/uvl
805 endif
806
807 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
808         PKG_SELECTED_MODULES+=libs/lucittpd
809 endif
810
811 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
812         PKG_SELECTED_MODULES+=modules/admin-core
813 endif
814 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
815         PKG_SELECTED_MODULES+=modules/admin-mini
816 endif
817 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
818         PKG_SELECTED_MODULES+=modules/admin-full
819 endif
820 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
821         PKG_SELECTED_MODULES+=modules/rpc
822 endif
823 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
824         PKG_SELECTED_MODULES+=modules/freifunk
825 endif
826
827 ifneq ($(CONFIG_PACKAGE_luci-freifunk-community),)
828         PKG_SELECTED_MODULES+=applications/freifunk-community
829 endif
830
831 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
832         PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
833 endif
834 ifneq ($(CONFIG_PACKAGE_luci-app-siitwizard),)
835         PKG_SELECTED_MODULES+=applications/luci-siitwizard
836 endif
837 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
838         PKG_SELECTED_MODULES+=applications/luci-fw
839 endif
840 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
841         PKG_SELECTED_MODULES+=applications/luci-olsr
842 endif
843 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
844         PKG_SELECTED_MODULES+=applications/luci-qos
845 endif
846 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
847         PKG_SELECTED_MODULES+=applications/luci-splash
848 endif
849 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
850         PKG_SELECTED_MODULES+=applications/luci-statistics
851 endif
852 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
853         PKG_SELECTED_MODULES+=applications/luci-upnp
854 endif
855 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
856         PKG_SELECTED_MODULES+=applications/luci-ntpc
857 endif
858 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
859         PKG_SELECTED_MODULES+=applications/luci-ddns
860 endif
861 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
862         PKG_SELECTED_MODULES+=applications/luci-samba
863 endif
864 ifneq ($(CONFIG_PACKAGE_luci-app-uvc_streamer),)
865         PKG_SELECTED_MODULES+=applications/luci-uvc_streamer
866 endif
867 ifneq ($(CONFIG_PACKAGE_luci-app-mmc_over_gpio),)
868         PKG_SELECTED_MODULES+=applications/luci-mmc_over_gpio
869 endif
870 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
871         PKG_SELECTED_MODULES+=applications/luci-p910nd
872 endif
873 ifneq ($(CONFIG_PACKAGE_luci-app-ushare),)
874         PKG_SELECTED_MODULES+=applications/luci-ushare
875 endif
876 ifneq ($(CONFIG_PACKAGE_luci-app-hd_idle),)
877        PKG_SELECTED_MODULES+=applications/luci-hd_idle
878 endif
879 ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),)
880        PKG_SELECTED_MODULES+=applications/luci-tinyproxy
881 endif
882 ifneq ($(CONFIG_PACKAGE_luci-app-initmgr),)
883        PKG_SELECTED_MODULES+=applications/luci-initmgr
884 endif
885 ifneq ($(CONFIG_PACKAGE_luci-app-livestats),)
886        PKG_SELECTED_MODULES+=applications/luci-livestats
887 endif
888 ifneq ($(CONFIG_PACKAGE_luci-app-asterisk),)
889        PKG_SELECTED_MODULES+=applications/luci-asterisk
890 endif
891 ifneq ($(CONFIG_PACKAGE_luci-app-polipo),)
892        PKG_SELECTED_MODULES+=applications/luci-polipo
893 endif
894 ifneq ($(CONFIG_PACKAGE_luci-app-openvpn),)
895        PKG_SELECTED_MODULES+=applications/luci-openvpn
896 endif
897
898
899 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
900         PKG_SELECTED_MODULES+=libs/sgi-cgi
901 endif
902 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
903         PKG_SELECTED_MODULES+=libs/sgi-luci
904 endif
905 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
906         PKG_SELECTED_MODULES+=libs/sgi-webuci
907 endif
908
909 ifneq ($(CONFIG_PACKAGE_luci-theme-base),)
910         PKG_SELECTED_MODULES+=themes/base
911 endif
912 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
913         PKG_SELECTED_MODULES+=themes/fledermaus
914 endif
915 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-bno),)
916         PKG_SELECTED_MODULES+=themes/freifunk-bno
917 endif
918 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk),)
919         PKG_SELECTED_MODULES+=themes/freifunk
920 endif
921 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
922         PKG_SELECTED_MODULES+=themes/openwrt.org
923 endif
924 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
925         PKG_SELECTED_MODULES+=themes/openwrt-light
926 endif
927
928 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
929         PKG_SELECTED_MODULES+=i18n/german
930 endif
931 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
932         PKG_SELECTED_MODULES+=i18n/english
933 endif
934 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
935         PKG_SELECTED_MODULES+=i18n/french
936 endif
937 ifneq ($(CONFIG_PACKAGE_luci-i18n-italian),)
938         PKG_SELECTED_MODULES+=i18n/italian
939 endif
940 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
941         PKG_SELECTED_MODULES+=i18n/russian
942 endif
943 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese_brazilian),)
944         PKG_SELECTED_MODULES+=i18n/portuguese_brazilian
945 endif
946
947
948 MAKE_FLAGS += \
949         MODULES="$(PKG_SELECTED_MODULES)" \
950         LUA_TARGET="$(LUA_TARGET)" \
951         LUA_SHLIBS="-llua -lm -ldl -lcrypt" \
952         CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
953         LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
954         OS="Linux"
955
956
957 $(eval $(call BuildPackage,luci-core))
958 $(eval $(call BuildPackage,luci-cbi))
959 $(eval $(call BuildPackage,luci-fastindex))
960 $(eval $(call BuildPackage,luci-http))
961 $(eval $(call BuildPackage,luci-httpclient))
962 $(eval $(call BuildPackage,luci-ipkg))
963 $(eval $(call BuildPackage,luci-json))
964 $(eval $(call BuildPackage,luci-nixio))
965 $(eval $(call BuildPackage,luci-uci))
966 $(eval $(call BuildPackage,luci-sys))
967 $(eval $(call BuildPackage,luci-web))
968 $(eval $(call BuildPackage,luci-uvl))
969
970 $(eval $(call BuildPackage,luci-httpd))
971
972 $(eval $(call BuildPackage,luci-admin-core))
973 $(eval $(call BuildPackage,luci-admin-mini))
974 $(eval $(call BuildPackage,luci-admin-full))
975 $(eval $(call BuildPackage,luci-admin-rpc))
976 $(eval $(call BuildPackage,luci-mod-freifunk))
977
978 $(eval $(call BuildPackage,luci-freifunk-community))
979
980 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
981 $(eval $(call BuildPackage,luci-app-siitwizard))
982 $(eval $(call BuildPackage,luci-app-firewall))
983 $(eval $(call BuildPackage,luci-app-olsr))
984 $(eval $(call BuildPackage,luci-app-qos))
985 $(eval $(call BuildPackage,luci-app-splash))
986 $(eval $(call BuildPackage,luci-app-statistics))
987 $(eval $(call BuildPackage,luci-app-upnp))
988 $(eval $(call BuildPackage,luci-app-ntpc))
989 $(eval $(call BuildPackage,luci-app-ddns))
990 $(eval $(call BuildPackage,luci-app-samba))
991 $(eval $(call BuildPackage,luci-app-uvc_streamer))
992 $(eval $(call BuildPackage,luci-app-mmc_over_gpio))
993 $(eval $(call BuildPackage,luci-app-p910nd))
994 $(eval $(call BuildPackage,luci-app-ushare))
995 $(eval $(call BuildPackage,luci-app-hd_idle))
996 $(eval $(call BuildPackage,luci-app-tinyproxy))
997 $(eval $(call BuildPackage,luci-app-initmgr))
998 $(eval $(call BuildPackage,luci-app-livestats))
999 $(eval $(call BuildPackage,luci-app-asterisk))
1000 $(eval $(call BuildPackage,luci-app-polipo))
1001 $(eval $(call BuildPackage,luci-app-openvpn))
1002
1003 $(eval $(call BuildPackage,luci-sgi-cgi))
1004 $(eval $(call BuildPackage,luci-sgi-luci))
1005 $(eval $(call BuildPackage,luci-sgi-webuci))
1006
1007 $(eval $(call BuildPackage,luci-theme-base))
1008 $(eval $(call BuildPackage,luci-theme-fledermaus))
1009 $(eval $(call BuildPackage,luci-theme-freifunk))
1010 $(eval $(call BuildPackage,luci-theme-freifunk-bno))
1011 $(eval $(call BuildPackage,luci-theme-openwrt))
1012 $(eval $(call BuildPackage,luci-theme-openwrtlight))
1013
1014 $(eval $(call BuildPackage,luci-i18n-german))
1015 $(eval $(call BuildPackage,luci-i18n-english))
1016 $(eval $(call BuildPackage,luci-i18n-french))
1017 $(eval $(call BuildPackage,luci-i18n-italian))
1018 $(eval $(call BuildPackage,luci-i18n-russian))
1019 $(eval $(call BuildPackage,luci-i18n-portuguese_brazilian))