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