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