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