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