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