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