58638ca208b43bbd4d532979e2985554652ce26e
[project/luci.git] / contrib / package / luci / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_BRANCH:=branches/luci-0.9
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
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:=luci
54   CATEGORY:=LuCI
55   TITLE:=LuCI - Lua Configuration Interface
56   URL:=http://luci.freifunk-halle.net/
57   MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
58   SUBMENU:=Libraries
59   DEPENDS:=+luci-core
60 endef
61
62 define Package/luci/fftemplate
63   $(call Package/luci/libtemplate)
64   SUBMENU:=Freifunk
65   DEPENDS:=+luci-mod-freifunk
66 endef
67
68 define Package/luci/i18ntemplate
69   $(call Package/luci/libtemplate)
70   SUBMENU:=Translations
71   DEPENDS:=+luci-web
72 endef
73
74 define Package/luci/thtemplate
75   $(call Package/luci/libtemplate)
76   SUBMENU:=Themes
77   DEPENDS:=+luci-web
78 endef
79
80 define Package/luci/webtemplate
81   $(call Package/luci/libtemplate)
82   SUBMENU:=Components
83 endef
84
85
86 define Package/luci/install/template
87         $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
88         $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
89 endef
90
91
92
93 ### Core package ###
94
95 define Package/luci-core
96   $(call Package/luci/libtemplate)
97   DEPENDS:=+lua +luci-nixio
98   TITLE:=LuCI core libraries
99 endef
100
101 define Package/luci-core/install
102         $(call Package/luci/install/template,$(1),libs/core)
103         $(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
104                 "OpenWrt Firmware" \
105                 "$(OPENWRTVERSION)" \
106                 "$(PKG_BRANCH)" \
107                 "$(PKG_VERSION)"
108 endef
109
110 define Package/luci-core/config
111        choice
112                prompt "Build Target"
113                default PACKAGE_luci-core_source
114
115        config PACKAGE_luci-core_compile
116                bool "Precompiled"
117
118        config PACKAGE_luci-core_stripped
119                bool "Stripped"
120
121        config PACKAGE_luci-core_source
122                bool "Full Source"
123
124        endchoice
125 endef
126
127 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
128   LUA_TARGET:=compile
129 endif
130
131 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
132   LUA_TARGET:=strip
133 endif
134
135 ifneq ($(CONFIG_PACKAGE_luci-core_zipped),)
136   LUA_TARGET:=gzip
137 endif
138
139
140 ### Libraries ###
141 define Package/luci-cbi
142   $(call Package/luci/libtemplate)
143   DEPENDS+=+luci-web +luci-uvl +luci-uci
144   TITLE:=Configuration Binding Interface
145 endef
146
147 define Package/luci-cbi/install
148         $(call Package/luci/install/template,$(1),libs/cbi)
149 endef
150
151
152 define Package/luci-uci
153   $(call Package/luci/libtemplate)
154   DEPENDS+=+libuci-lua
155   TITLE:=High-Level UCI API
156 endef
157
158 define Package/luci-uci/install
159         $(call Package/luci/install/template,$(1),libs/uci)
160 endef
161
162
163 define Package/luci-fastindex
164   $(call Package/luci/libtemplate)
165   TITLE:=Fastindex indexing module
166 endef
167
168 define Package/luci-fastindex/install
169         $(call Package/luci/install/template,$(1),libs/fastindex)
170 endef
171
172
173 define Package/luci-http
174   $(call Package/luci/libtemplate)
175   TITLE:=HTTP Protocol implementation
176 endef
177
178 define Package/luci-http/install
179         $(call Package/luci/install/template,$(1),libs/http)
180 endef
181
182
183 define Package/luci-httpclient
184   $(call Package/luci/libtemplate)
185   TITLE:=HTTP(S) client library
186   DEPENDS+=+luci-http +luci-nixio
187 endef
188
189 define Package/luci-httpclient/install
190         $(call Package/luci/install/template,$(1),libs/httpclient)
191 endef
192
193
194 define Package/luci-ipkg
195   $(call Package/luci/libtemplate)
196   TITLE:=LuCI IPKG/OPKG call abstraction library
197 endef
198
199 define Package/luci-ipkg/install
200         $(call Package/luci/install/template,$(1),libs/ipkg)
201 endef
202
203
204 define Package/luci-json
205   $(call Package/luci/libtemplate)
206   TITLE:=LuCI JSON Library
207 endef
208
209 define Package/luci-json/install
210         $(call Package/luci/install/template,$(1),libs/json)
211 endef
212
213
214 define Package/luci-luanet
215   $(call Package/luci/libtemplate)
216   TITLE:=luanet
217   DEPENDS+=+libiw
218 endef
219
220 define Package/luci-luanet/install
221         $(call Package/luci/install/template,$(1),libs/luanet)
222 endef
223
224
225 define Package/luci-lucid
226   $(call Package/luci/libtemplate)
227   TITLE:=LuCId Superserver
228   DEPENDS+=+luci-nixio +luci-http +luci-px5g
229 endef
230
231 define Package/luci-lucid/install
232         $(call Package/luci/install/template,$(1),libs/lucid)
233         $(call Package/luci/install/template,$(1),libs/lucid-http)
234 endef
235
236
237
238 NIXIO_TLS:=axtls
239
240 define Package/luci-nixio
241   $(call Package/luci/libtemplate)
242   TITLE:=NIXIO POSIX Library
243   DEPENDS:=+PACKAGE_luci-nixio_openssl:libopenssl +PACKAGE_luci-nixio_cyassl:libcyassl-luci
244 endef
245
246 define Package/luci-nixio/install
247         $(call Package/luci/install/template,$(1),libs/nixio)
248 endef
249
250 define Package/luci-nixio/config
251         choice
252                 prompt "TLS Provider"
253                 default PACKAGE_luci-nixio_axtls
254
255                 config PACKAGE_luci-nixio_axtls
256                         bool "Builtin (axTLS)"
257
258                 config PACKAGE_luci-nixio_cyassl
259                         bool "CyaSSL"
260                         select PACKAGE_libcyassl-luci
261
262                 config PACKAGE_luci-nixio_openssl
263                         bool "OpenSSL"
264                         select PACKAGE_libopenssl
265         endchoice
266 endef
267
268 ifneq ($(CONFIG_PACKAGE_luci-nixio_openssl),)
269   NIXIO_TLS:=openssl
270 endif
271
272 ifneq ($(CONFIG_PACKAGE_luci-nixio_cyassl),)
273   NIXIO_TLS:=cyassl
274   LUCI_CFLAGS+=-I$(STAGING_DIR)/usr/include/cyassl
275 endif
276
277
278 define Package/luci-px5g
279   $(call Package/luci/libtemplate)
280   TITLE:=PX5G RSA Keymaster
281   DEPENDS:=+luci-nixio
282 endef
283
284 define Package/luci-px5g/install
285         $(call Package/luci/install/template,$(1),libs/px5g)
286 endef
287
288
289 define Package/luci-sys
290   $(call Package/luci/libtemplate)
291   TITLE:=LuCI Linux/POSIX system library
292 endef
293
294 define Package/luci-sys/install
295         $(call Package/luci/install/template,$(1),libs/sys)
296 endef
297
298
299 define Package/luci-web
300   $(call Package/luci/libtemplate)
301   DEPENDS+=+luci-http +luci-sys +luci-uci +luci-lucid +luci-sgi-cgi
302   TITLE:=MVC Webframework
303   $(call Config,luci.main.lang,string,en,Default Language)
304 endef
305
306 define Package/luci-web/conffiles
307 /etc/config/luci
308 endef
309
310 define Package/luci-web/install
311         $(call Package/luci/install/template,$(1),libs/web)
312 endef
313
314
315 define Package/luci-uvl
316   $(call Package/luci/libtemplate)
317   DEPENDS+=+luci-sys +luci-uci +luci-core
318   TITLE:=UVL - UCI Validation Layer
319 endef
320
321 define Package/luci-uvl/install
322         $(call Package/luci/install/template,$(1),libs/uvl)
323 endef
324
325
326
327 ### Community Packages ###
328
329 define Package/luci-freifunk-community
330   $(call Package/luci/fftemplate)
331   DEPENDS+= \
332    +luci-lucid +luci-sgi-cgi +luci-app-splash \
333    +luci-app-ffwizard-leipzig \
334    +luci-i18n-german \
335    +PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
336    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-txtinfo +PACKAGE_luci-freifunk-community:olsrd-luci-mod-nameservice \
337    +PACKAGE_luci-freifunk-community:olsrd-luci-mod-watchdog +PACKAGE_luci-freifunk-community:kmod-tun \
338    +PACKAGE_luci-freifunk-community:ip +PACKAGE_luci-freifunk-community:freifunk-watchdog +luci-app-olsr \
339    +PACKAGE_luci-freifunk-community:remote-update
340   TITLE:=Freifunk Community Meta-Package
341 endef
342
343 define Package/luci-freifunk-community/install
344         $(call Package/luci/install/template,$(1),applications/freifunk-community)
345 endef
346
347 ### Modules ###
348
349 define Package/luci-admin-core
350   $(call Package/luci/webtemplate)
351   DEPENDS+=+luci-web +luci-cbi +luci-i18n-english
352   TITLE:=Web UI Core Module
353 endef
354
355 define Package/luci-admin-core/conffiles
356 /etc/config/luci_hosts
357 /etc/config/luci_ethers
358 endef
359
360 define Package/luci-admin-core/install
361         $(call Package/luci/install/template,$(1),modules/admin-core)
362         touch $(1)/etc/init.d/luci_fixtime || true
363 endef
364
365
366 define Package/luci-admin-mini
367   $(call Package/luci/webtemplate)
368   DEPENDS+=+luci-admin-core
369   TITLE:=LuCI Essentials - stripped down and user-friendly
370 endef
371
372 define Package/luci-admin-mini/install
373         $(call Package/luci/install/template,$(1),modules/admin-mini)
374 endef
375
376
377 define Package/luci-admin-full
378   $(call Package/luci/webtemplate)
379   DEPENDS+=+luci-admin-core +luci-ipkg
380   TITLE:=LuCI Administration - full-featured for full control
381 endef
382
383 define Package/luci-admin-full/install
384         $(call Package/luci/install/template,$(1),modules/admin-full)
385 endef
386
387
388 define Package/luci-admin-rpc
389   $(call Package/luci/webtemplate)
390   DEPENDS+=+luci-json
391   TITLE:=LuCI RPC - JSON-RPC API
392 endef
393
394 define Package/luci-admin-rpc/install
395         $(call Package/luci/install/template,$(1),modules/rpc)
396 endef
397
398
399 define Package/luci-mod-freifunk
400   $(call Package/luci/fftemplate)
401   DEPENDS:=+luci-admin-full +luci-json +PACKAGE_luci-mod-freifunk:freifunk-firewall
402   TITLE:=LuCI Freifunk module
403 endef
404
405 define Package/luci-mod-freifunk/conffiles
406 /etc/config/freifunk
407 endef
408
409 define Package/luci-mod-freifunk/install
410         $(call Package/luci/install/template,$(1),modules/freifunk)
411 endef
412
413
414
415 ### Applications ###
416
417 define Package/luci-app-ffwizard-leipzig
418   $(call Package/luci/fftemplate)
419   TITLE:=Freifunk Leipzig configuration wizard
420 endef
421
422 define Package/luci-app-ffwizard-leipzig/install
423         $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
424 endef
425
426
427 define Package/luci-app-siitwizard
428   $(call Package/luci/fftemplate)
429   TITLE:=SIIT IPv4-over-IPv6 configuration wizard
430   DEPENDS:=+luci-admin-core +PACKAGE_luci-app-siitwizard:kmod-siit
431 endef
432
433 define Package/luci-app-siitwizard/install
434         $(call Package/luci/install/template,$(1),applications/luci-siitwizard)
435 endef
436
437
438 define Package/luci-app-firewall
439   $(call Package/luci/webtemplate)
440   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-firewall:firewall
441   TITLE:=Firewall and Portforwarding application
442 endef
443
444 define Package/luci-app-firewall/install
445         $(call Package/luci/install/template,$(1),applications/luci-fw)
446 endef
447
448
449 define Package/luci-app-olsr
450   $(call Package/luci/webtemplate)
451   DEPENDS+=+luci-admin-full +PACKAGE_luci-app-olsr:olsrd-luci \
452    +PACKAGE_luci-app-olsr:olsrd-luci-mod-txtinfo
453   TITLE:=OLSR configuration and status module
454 endef
455
456 define Package/luci-app-olsr/install
457         $(call Package/luci/install/template,$(1),applications/luci-olsr)
458 endef
459
460
461 define Package/luci-app-qos
462   $(call Package/luci/webtemplate)
463   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-qos:qos-scripts
464   TITLE:=Quality of Service configuration module
465 endef
466
467 define Package/luci-app-qos/install
468         $(call Package/luci/install/template,$(1),applications/luci-qos)
469 endef
470
471
472 define Package/luci-app-splash
473   $(call Package/luci/fftemplate)
474   DEPENDS+=+PACKAGE_luci-app-splash:luci-nixio \
475    +PACKAGE_luci-app-splash:tc +PACKAGE_luci-app-splash:kmod-sched \
476    +PACKAGE_luci-app-splash:iptables-mod-nat-extra \
477    +PACKAGE_luci-app-splash:iptables-mod-ipopt
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-polipo
638   $(call Package/luci/webtemplate)
639   TITLE:=LuCI Support for the Polipo Proxy
640   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-polipo:polipo
641 endef
642
643 define Package/luci-app-polipo/install
644         $(call Package/luci/install/template,$(1),applications/luci-polipo)
645 endef
646
647 define Package/luci-app-openvpn
648   $(call Package/luci/webtemplate)
649   TITLE:=LuCI Support for OpenVPN
650   DEPENDS+=+luci-admin-core +PACKAGE_luci-app-openvpn:openvpn
651 endef
652
653 define Package/luci-app-openvpn/install
654         $(call Package/luci/install/template,$(1),applications/luci-openvpn)
655 endef
656
657 define Package/luci-app-p2pblock
658   $(call Package/luci/webtemplate)
659   TITLE:=LuCI Support for the Freifunk P2P-Block addon
660   DEPENDS+=+luci-admin-core +luci-app-firewall \
661     +PACKAGE_luci-app-p2pblock:freifunk-p2pblock
662 endef
663
664 define Package/luci-app-p2pblock/install
665         $(call Package/luci/install/template,$(1),applications/luci-p2pblock)
666 endef
667
668
669 ### Server Gateway Interfaces ###
670
671 define Package/luci-sgi-cgi
672   $(call Package/luci/libtemplate)
673   TITLE:=SGI for CGI
674 endef
675
676 define Package/luci-sgi-cgi/install
677         $(call Package/luci/install/template,$(1),libs/sgi-cgi)
678 endef
679
680 ### Themes ###
681 define Package/luci-theme-base
682   $(call Package/luci/thtemplate)
683   DEPENDS:=+luci-web
684   TITLE:=Common base for all themes
685 endef
686
687 define Package/luci-theme-base/install
688         $(call Package/luci/install/template,$(1),themes/base)
689 endef
690
691 define Package/luci-theme-fledermaus
692   $(call Package/luci/fftemplate)
693   DEPENDS:=+luci-web
694   TITLE:=Fledermaus Theme
695 endef
696
697 define Package/luci-theme-fledermaus/install
698         $(call Package/luci/install/template,$(1),themes/fledermaus)
699 endef
700
701 define Package/luci-theme-freifunk
702   $(call Package/luci/fftemplate)
703   DEPENDS:=+luci-web
704   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
705   TITLE:=alternative Freifunk Theme
706 endef
707
708 define Package/luci-theme-freifunk/install
709         $(call Package/luci/install/template,$(1),themes/freifunk)
710 endef
711
712 define Package/luci-theme-freifunk-bno
713   $(call Package/luci/fftemplate)
714   DEPENDS:=+luci-web
715   MAINTAINER:=Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>
716   TITLE:=Freifunk Berlin Nordost Theme
717 endef
718
719 define Package/luci-theme-freifunk-bno/install
720         $(call Package/luci/install/template,$(1),themes/freifunk-bno)
721 endef
722
723 define Package/luci-theme-freifunk-hannover
724   $(call Package/luci/fftemplate)
725   DEPENDS:=+luci-web
726   MAINTAINER:=Mikolas Bingemer <mickey-at-freifunk-hannover-dot-de>
727   TITLE:=Freifunk Hannover Theme
728 endef
729
730 define Package/luci-theme-freifunk-hannover/install
731         $(call Package/luci/install/template,$(1),themes/freifunk-hannover)
732 endef
733
734 define Package/luci-theme-openwrt
735   $(call Package/luci/thtemplate)
736   TITLE:=OpenWrt.org (default)
737   DEPENDS:=+luci-theme-base
738 endef
739
740 define Package/luci-theme-openwrt/install
741         $(call Package/luci/install/template,$(1),themes/openwrt.org)
742 endef
743
744 define Package/luci-theme-openwrtlight
745   $(call Package/luci/thtemplate)
746   TITLE:=OpenWrt.org - light variant without images
747   DEPENDS:=+luci-theme-base
748 endef
749
750 define Package/luci-theme-openwrtlight/install
751         $(call Package/luci/install/template,$(1),themes/openwrt-light)
752 endef
753
754
755 ### Translations ###
756 define Package/luci-i18n-german
757   $(call Package/luci/i18ntemplate)
758   TITLE:=German
759 endef
760
761 define Package/luci-i18n-german/install
762         $(call Package/luci/install/template,$(1),i18n/german)
763 endef
764
765
766 define Package/luci-i18n-english
767   $(call Package/luci/i18ntemplate)
768   TITLE:=English
769 endef
770
771 define Package/luci-i18n-english/install
772         $(call Package/luci/install/template,$(1),i18n/english)
773 endef
774
775
776 define Package/luci-i18n-french
777   $(call Package/luci/i18ntemplate)
778   TITLE:=French (by Florian Fainelli)
779 endef
780
781 define Package/luci-i18n-french/install
782         $(call Package/luci/install/template,$(1),i18n/french)
783 endef
784
785
786 define Package/luci-i18n-italian
787   $(call Package/luci/i18ntemplate)
788   TITLE:=Italian (by Matteo Croce)
789 endef
790
791 define Package/luci-i18n-italian/install
792         $(call Package/luci/install/template,$(1),i18n/italian)
793 endef
794
795
796 define Package/luci-i18n-russian
797   $(call Package/luci/i18ntemplate)
798   TITLE:=Russian (by Skryabin Dmitry)
799 endef
800
801 define Package/luci-i18n-russian/install
802         $(call Package/luci/install/template,$(1),i18n/russian)
803 endef
804
805
806 define Package/luci-i18n-portuguese_brazilian
807   $(call Package/luci/i18ntemplate)
808   TITLE:=Portuguese (Brazilian) (by Carlos Cesario)
809 endef
810
811 define Package/luci-i18n-portuguese_brazilian/install
812         $(call Package/luci/install/template,$(1),i18n/portuguese_brazilian)
813 endef
814
815
816 define Package/luci-i18n-japanese
817   $(call Package/luci/i18ntemplate)
818   TITLE:=Japanese (by Tsukasa Hamano)
819 endef
820
821 define Package/luci-i18n-japanese/install
822         $(call Package/luci/install/template,$(1),i18n/japanese)
823 endef
824
825
826 define Package/luci-i18n-greek
827   $(call Package/luci/i18ntemplate)
828   TITLE:=Greek (by Vasilis Tsiligiannis)
829 endef
830
831 define Package/luci-i18n-greek/install
832         $(call Package/luci/install/template,$(1),i18n/greek)
833 endef
834
835
836 define Package/luci-i18n-catalan
837   $(call Package/luci/i18ntemplate)
838   TITLE:=Catalan (by Eduard Duran)
839 endef
840
841 define Package/luci-i18n-catalan/install
842         $(call Package/luci/install/template,$(1),i18n/catalan)
843 endef
844
845
846 define Package/luci-i18n-portuguese
847   $(call Package/luci/i18ntemplate)
848   TITLE:=Portuguese (by Jose Monteiro)
849 endef
850
851 define Package/luci-i18n-portuguese/install
852         $(call Package/luci/install/template,$(1),i18n/portuguese)
853 endef
854
855
856 ### Compile ###
857 ifneq ($(CONFIG_PACKAGE_luci-core),)
858         PKG_SELECTED_MODULES+=libs/core
859 endif
860 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
861         PKG_SELECTED_MODULES+=libs/cbi
862 endif
863 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
864         PKG_SELECTED_MODULES+=libs/fastindex
865 endif
866 ifneq ($(CONFIG_PACKAGE_luci-http),)
867         PKG_SELECTED_MODULES+=libs/http
868 endif
869 ifneq ($(CONFIG_PACKAGE_luci-httpclient),)
870         PKG_SELECTED_MODULES+=libs/httpclient
871 endif
872 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
873         PKG_SELECTED_MODULES+=libs/ipkg
874 endif
875 ifneq ($(CONFIG_PACKAGE_luci-json),)
876         PKG_SELECTED_MODULES+=libs/json
877 endif
878 ifneq ($(CONFIG_PACKAGE_luci-luanet),)
879         PKG_SELECTED_MODULES+=libs/luanet
880 endif
881 ifneq ($(CONFIG_PACKAGE_luci-lucid),)
882         PKG_SELECTED_MODULES+=libs/lucid libs/lucid-http
883 endif
884 ifneq ($(CONFIG_PACKAGE_luci-nixio),)
885         PKG_SELECTED_MODULES+=libs/nixio
886 endif
887 ifneq ($(CONFIG_PACKAGE_luci-px5g),)
888         PKG_SELECTED_MODULES+=libs/px5g
889 endif
890 ifneq ($(CONFIG_PACKAGE_luci-uci),)
891         PKG_SELECTED_MODULES+=libs/uci
892 endif
893 ifneq ($(CONFIG_PACKAGE_luci-sys),)
894         PKG_SELECTED_MODULES+=libs/sys
895 endif
896 ifneq ($(CONFIG_PACKAGE_luci-web),)
897         PKG_SELECTED_MODULES+=libs/web
898 endif
899 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
900         PKG_SELECTED_MODULES+=libs/uvl
901 endif
902
903 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
904         PKG_SELECTED_MODULES+=modules/admin-core
905 endif
906 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
907         PKG_SELECTED_MODULES+=modules/admin-mini
908 endif
909 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
910         PKG_SELECTED_MODULES+=modules/admin-full
911 endif
912 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
913         PKG_SELECTED_MODULES+=modules/rpc
914 endif
915 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
916         PKG_SELECTED_MODULES+=modules/freifunk
917 endif
918
919 ifneq ($(CONFIG_PACKAGE_luci-freifunk-community),)
920         PKG_SELECTED_MODULES+=applications/freifunk-community
921 endif
922
923 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
924         PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
925 endif
926 ifneq ($(CONFIG_PACKAGE_luci-app-siitwizard),)
927         PKG_SELECTED_MODULES+=applications/luci-siitwizard
928 endif
929 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
930         PKG_SELECTED_MODULES+=applications/luci-fw
931 endif
932 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
933         PKG_SELECTED_MODULES+=applications/luci-olsr
934 endif
935 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
936         PKG_SELECTED_MODULES+=applications/luci-qos
937 endif
938 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
939         PKG_SELECTED_MODULES+=applications/luci-splash
940 endif
941 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
942         PKG_SELECTED_MODULES+=applications/luci-statistics
943 endif
944 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
945         PKG_SELECTED_MODULES+=applications/luci-upnp
946 endif
947 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
948         PKG_SELECTED_MODULES+=applications/luci-ntpc
949 endif
950 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
951         PKG_SELECTED_MODULES+=applications/luci-ddns
952 endif
953 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
954         PKG_SELECTED_MODULES+=applications/luci-samba
955 endif
956 ifneq ($(CONFIG_PACKAGE_luci-app-uvc_streamer),)
957         PKG_SELECTED_MODULES+=applications/luci-uvc_streamer
958 endif
959 ifneq ($(CONFIG_PACKAGE_luci-app-mmc_over_gpio),)
960         PKG_SELECTED_MODULES+=applications/luci-mmc_over_gpio
961 endif
962 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
963         PKG_SELECTED_MODULES+=applications/luci-p910nd
964 endif
965 ifneq ($(CONFIG_PACKAGE_luci-app-ushare),)
966         PKG_SELECTED_MODULES+=applications/luci-ushare
967 endif
968 ifneq ($(CONFIG_PACKAGE_luci-app-hd_idle),)
969        PKG_SELECTED_MODULES+=applications/luci-hd_idle
970 endif
971 ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),)
972        PKG_SELECTED_MODULES+=applications/luci-tinyproxy
973 endif
974 ifneq ($(CONFIG_PACKAGE_luci-app-initmgr),)
975        PKG_SELECTED_MODULES+=applications/luci-initmgr
976 endif
977 ifneq ($(CONFIG_PACKAGE_luci-app-livestats),)
978        PKG_SELECTED_MODULES+=applications/luci-livestats
979 endif
980 ifneq ($(CONFIG_PACKAGE_luci-app-polipo),)
981        PKG_SELECTED_MODULES+=applications/luci-polipo
982 endif
983 ifneq ($(CONFIG_PACKAGE_luci-app-openvpn),)
984        PKG_SELECTED_MODULES+=applications/luci-openvpn
985 endif
986 ifneq ($(CONFIG_PACKAGE_luci-app-p2pblock),)
987        PKG_SELECTED_MODULES+=applications/luci-p2pblock
988 endif
989
990
991 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
992         PKG_SELECTED_MODULES+=libs/sgi-cgi
993 endif
994 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
995         PKG_SELECTED_MODULES+=libs/sgi-luci
996 endif
997
998 ifneq ($(CONFIG_PACKAGE_luci-theme-base),)
999         PKG_SELECTED_MODULES+=themes/base
1000 endif
1001 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
1002         PKG_SELECTED_MODULES+=themes/fledermaus
1003 endif
1004 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-bno),)
1005         PKG_SELECTED_MODULES+=themes/freifunk-bno
1006 endif
1007 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk-hannover),)
1008         PKG_SELECTED_MODULES+=themes/freifunk-hannover
1009 endif
1010 ifneq ($(CONFIG_PACKAGE_luci-theme-freifunk),)
1011         PKG_SELECTED_MODULES+=themes/freifunk
1012 endif
1013 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
1014         PKG_SELECTED_MODULES+=themes/openwrt.org
1015 endif
1016 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
1017         PKG_SELECTED_MODULES+=themes/openwrt-light
1018 endif
1019
1020 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
1021         PKG_SELECTED_MODULES+=i18n/german
1022 endif
1023 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
1024         PKG_SELECTED_MODULES+=i18n/english
1025 endif
1026 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
1027         PKG_SELECTED_MODULES+=i18n/french
1028 endif
1029 ifneq ($(CONFIG_PACKAGE_luci-i18n-italian),)
1030         PKG_SELECTED_MODULES+=i18n/italian
1031 endif
1032 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
1033         PKG_SELECTED_MODULES+=i18n/russian
1034 endif
1035 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese_brazilian),)
1036         PKG_SELECTED_MODULES+=i18n/portuguese_brazilian
1037 endif
1038 ifneq ($(CONFIG_PACKAGE_luci-i18n-japanese),)
1039         PKG_SELECTED_MODULES+=i18n/japanese
1040 endif
1041 ifneq ($(CONFIG_PACKAGE_luci-i18n-greek),)
1042         PKG_SELECTED_MODULES+=i18n/greek
1043 endif
1044 ifneq ($(CONFIG_PACKAGE_luci-i18n-catalan),)
1045         PKG_SELECTED_MODULES+=i18n/catalan
1046 endif
1047 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese),)
1048         PKG_SELECTED_MODULES+=i18n/portuguese
1049 endif
1050
1051
1052 MAKE_FLAGS += \
1053         MODULES="$(PKG_SELECTED_MODULES)" \
1054         LUA_TARGET="$(LUA_TARGET)" \
1055         LUA_SHLIBS="-llua -lm -ldl -lcrypt" \
1056         CFLAGS="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
1057         LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
1058         NIXIO_TLS="$(NIXIO_TLS)" OS="Linux"
1059
1060
1061 $(eval $(call BuildPackage,luci-core))
1062 $(eval $(call BuildPackage,luci-cbi))
1063 $(eval $(call BuildPackage,luci-fastindex))
1064 $(eval $(call BuildPackage,luci-http))
1065 $(eval $(call BuildPackage,luci-httpclient))
1066 $(eval $(call BuildPackage,luci-ipkg))
1067 $(eval $(call BuildPackage,luci-json))
1068 $(eval $(call BuildPackage,luci-luanet))
1069 $(eval $(call BuildPackage,luci-lucid))
1070 $(eval $(call BuildPackage,luci-nixio))
1071 $(eval $(call BuildPackage,luci-px5g))
1072 $(eval $(call BuildPackage,luci-uci))
1073 $(eval $(call BuildPackage,luci-sys))
1074 $(eval $(call BuildPackage,luci-web))
1075 $(eval $(call BuildPackage,luci-uvl))
1076
1077 $(eval $(call BuildPackage,luci-admin-core))
1078 $(eval $(call BuildPackage,luci-admin-mini))
1079 $(eval $(call BuildPackage,luci-admin-full))
1080 $(eval $(call BuildPackage,luci-admin-rpc))
1081 $(eval $(call BuildPackage,luci-mod-freifunk))
1082
1083 $(eval $(call BuildPackage,luci-freifunk-community))
1084
1085 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
1086 $(eval $(call BuildPackage,luci-app-siitwizard))
1087 $(eval $(call BuildPackage,luci-app-firewall))
1088 $(eval $(call BuildPackage,luci-app-olsr))
1089 $(eval $(call BuildPackage,luci-app-qos))
1090 $(eval $(call BuildPackage,luci-app-splash))
1091 $(eval $(call BuildPackage,luci-app-statistics))
1092 $(eval $(call BuildPackage,luci-app-upnp))
1093 $(eval $(call BuildPackage,luci-app-ntpc))
1094 $(eval $(call BuildPackage,luci-app-ddns))
1095 $(eval $(call BuildPackage,luci-app-samba))
1096 $(eval $(call BuildPackage,luci-app-uvc_streamer))
1097 $(eval $(call BuildPackage,luci-app-mmc_over_gpio))
1098 $(eval $(call BuildPackage,luci-app-p910nd))
1099 $(eval $(call BuildPackage,luci-app-ushare))
1100 $(eval $(call BuildPackage,luci-app-hd_idle))
1101 $(eval $(call BuildPackage,luci-app-tinyproxy))
1102 $(eval $(call BuildPackage,luci-app-initmgr))
1103 $(eval $(call BuildPackage,luci-app-livestats))
1104 $(eval $(call BuildPackage,luci-app-polipo))
1105 $(eval $(call BuildPackage,luci-app-openvpn))
1106 $(eval $(call BuildPackage,luci-app-p2pblock))
1107
1108 $(eval $(call BuildPackage,luci-sgi-cgi))
1109
1110 $(eval $(call BuildPackage,luci-theme-base))
1111 $(eval $(call BuildPackage,luci-theme-fledermaus))
1112 $(eval $(call BuildPackage,luci-theme-freifunk))
1113 $(eval $(call BuildPackage,luci-theme-freifunk-bno))
1114 $(eval $(call BuildPackage,luci-theme-freifunk-hannover))
1115 $(eval $(call BuildPackage,luci-theme-openwrt))
1116 $(eval $(call BuildPackage,luci-theme-openwrtlight))
1117
1118 $(eval $(call BuildPackage,luci-i18n-german))
1119 $(eval $(call BuildPackage,luci-i18n-english))
1120 $(eval $(call BuildPackage,luci-i18n-french))
1121 $(eval $(call BuildPackage,luci-i18n-italian))
1122 $(eval $(call BuildPackage,luci-i18n-russian))
1123 $(eval $(call BuildPackage,luci-i18n-portuguese_brazilian))
1124 $(eval $(call BuildPackage,luci-i18n-japanese))
1125 $(eval $(call BuildPackage,luci-i18n-greek))
1126 $(eval $(call BuildPackage,luci-i18n-catalan))
1127 $(eval $(call BuildPackage,luci-i18n-portuguese))