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