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