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