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