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