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