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