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