1 include $(TOPDIR)/rules.mk
6 USELOCAL:=$(shell grep luci ../../../.project 2>/dev/null >/dev/null && echo 1)
15 PKG_SOURCE_URL:=http://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
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)
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
23 PKG_SOURCE_VERSION:=$(PKG_REV)
26 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
27 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
29 PKG_BUILD_DEPENDS:=libnotimpl
31 PKG_SELECTED_MODULES:=
34 include $(INCLUDE_DIR)/package.mk
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' \
43 tar x -C $(PKG_BUILD_DIR)/
47 define Build/Configure
52 define Package/luci/libtemplate
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
62 define Package/luci/fftemplate
63 $(call Package/luci/libtemplate)
64 SUBMENU:=LuCI Freifunk Support (GERMAN ONLY)
65 DEPENDS:=+luci-mod-freifunk
68 define Package/luci/httpdtemplate
69 $(call Package/luci/libtemplate)
70 SUBMENU:=LuCI Non-Forking HTTP-Daemon (EXPERIMENTAL)
74 define Package/luci/i18ntemplate
75 $(call Package/luci/libtemplate)
76 SUBMENU:=LuCI Translations
80 define Package/luci/thtemplate
81 $(call Package/luci/libtemplate)
86 define Package/luci/webtemplate
87 $(call Package/luci/libtemplate)
88 SUBMENU:=LuCI Components
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
101 define Package/luci-core
102 $(call Package/luci/libtemplate)
103 DEPENDS:=+lua +luaposix +bitlib
104 TITLE:=LuCI core libraries
107 define Package/luci-core/install
108 $(call Package/luci/install/template,$(1),libs/core)
111 define Package/luci-core/config
113 prompt "Build Target"
114 default PACKAGE_luci-core_source
116 config PACKAGE_luci-core_compile
119 config PACKAGE_luci-core_stripped
122 config PACKAGE_luci-core_source
128 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
132 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
138 define Package/luci-cbi
139 $(call Package/luci/libtemplate)
140 DEPENDS+=+luci-web +luci-uvl +luci-uci
141 TITLE:=Configuration Binding Interface
144 define Package/luci-cbi/install
145 $(call Package/luci/install/template,$(1),libs/cbi)
149 define Package/luci-uci
150 $(call Package/luci/libtemplate)
152 TITLE:=High-Level UCI API
155 define Package/luci-uci/install
156 $(call Package/luci/install/template,$(1),libs/uci)
160 define Package/luci-fastindex
161 $(call Package/luci/libtemplate)
162 TITLE:=Fastindex indexing module
165 define Package/luci-fastindex/install
166 $(call Package/luci/install/template,$(1),libs/fastindex)
170 define Package/luci-http
171 $(call Package/luci/libtemplate)
172 TITLE:=HTTP Protocol implementation
175 define Package/luci-http/install
176 $(call Package/luci/install/template,$(1),libs/http)
180 define Package/luci-ipkg
181 $(call Package/luci/libtemplate)
182 TITLE:=LuCI IPKG/OPKG call abstraction library
185 define Package/luci-ipkg/install
186 $(call Package/luci/install/template,$(1),libs/ipkg)
190 define Package/luci-json
191 $(call Package/luci/libtemplate)
192 TITLE:=LuCI JSON Library
195 define Package/luci-json/install
196 $(call Package/luci/install/template,$(1),libs/json)
200 define Package/luci-sys
201 $(call Package/luci/libtemplate)
202 TITLE:=LuCI Linux/POSIX system library
205 define Package/luci-sys/install
206 $(call Package/luci/install/template,$(1),libs/sys)
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
216 define Package/luci-web/conffiles
220 define Package/luci-web/install
221 $(call Package/luci/install/template,$(1),libs/web)
225 define Package/luci-uvl
226 $(call Package/luci/libtemplate)
227 DEPENDS+=+luci-sys +luci-uci +luci-core
228 TITLE:=UVL - UCI Validation Layer
231 define Package/luci-uvl/install
232 $(call Package/luci/install/template,$(1),libs/uvl)
239 define Package/luci-httpd
240 $(call Package/luci/httpdtemplate)
241 DEPENDS:=+luci-http +luasocket
245 define Package/luci-httpd/install
246 $(call Package/luci/install/template,$(1),libs/httpd)
251 ### Community Packages ###
253 define Package/luci-freifunk-community
254 $(call Package/luci/fftemplate)
256 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
257 +luci-app-ffwizard-leipzig \
258 +luci-theme-fledermaus \
260 +olsrd-luci +olsrd-luci-mod-dyn-gw +olsrd-luci-mod-txtinfo +olsrd-luci-mod-nameservice \
262 TITLE:=Freifunk Community Meta-Package
265 define Package/luci-freifunk-community/install
266 $(call Package/luci/install/template,$(1),applications/freifunk-community)
271 define Package/luci-admin-core
272 $(call Package/luci/webtemplate)
273 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
274 TITLE:=Web UI Core Module
277 define Package/luci-admin-core/conffiles
278 /etc/config/luci_hosts
279 /etc/config/luci_ethers
282 define Package/luci-admin-core/install
283 $(call Package/luci/install/template,$(1),modules/admin-core)
287 define Package/luci-admin-mini
288 $(call Package/luci/webtemplate)
289 DEPENDS+=+luci-admin-core
290 TITLE:=LuCI Essentials - stripped down and user-friendly
293 define Package/luci-admin-mini/install
294 $(call Package/luci/install/template,$(1),modules/admin-mini)
298 define Package/luci-admin-full
299 $(call Package/luci/webtemplate)
300 DEPENDS+=+luci-admin-core +luci-ipkg
301 TITLE:=LuCI Administration - full-featured for full control
304 define Package/luci-admin-full/install
305 $(call Package/luci/install/template,$(1),modules/admin-full)
309 define Package/luci-admin-rpc
310 $(call Package/luci/webtemplate)
312 TITLE:=LuCI RPC - JSON-RPC API
315 define Package/luci-admin-rpc/install
316 $(call Package/luci/install/template,$(1),modules/rpc)
320 define Package/luci-mod-freifunk
321 $(call Package/luci/fftemplate)
322 DEPENDS:=+luci-admin-full
323 TITLE:=LuCI Freifunk module
326 define Package/luci-mod-freifunk/conffiles
330 define Package/luci-mod-freifunk/install
331 $(call Package/luci/install/template,$(1),modules/freifunk)
338 define Package/luci-app-ffwizard-leipzig
339 $(call Package/luci/fftemplate)
340 TITLE:=Freifunk Leipzig configuration wizard
343 define Package/luci-app-ffwizard-leipzig/install
344 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
348 define Package/luci-app-firewall
349 $(call Package/luci/webtemplate)
350 DEPENDS+=+luci-admin-core
351 TITLE:=Firewall and Portforwarding application
354 define Package/luci-app-firewall/install
355 $(call Package/luci/install/template,$(1),applications/luci-fw)
359 define Package/luci-app-olsr
360 $(call Package/luci/webtemplate)
361 DEPENDS+=+luci-admin-full +olsrd-luci +olsrd-luci-mod-txtinfo
362 TITLE:=OLSR configuration and status module
365 define Package/luci-app-olsr/install
366 $(call Package/luci/install/template,$(1),applications/luci-olsr)
370 define Package/luci-app-qos
371 $(call Package/luci/webtemplate)
372 DEPENDS+=+luci-admin-core +qos-scripts
373 TITLE:=Quality of Service configuration module
376 define Package/luci-app-qos/install
377 $(call Package/luci/install/template,$(1),applications/luci-qos)
381 define Package/luci-app-splash
382 $(call Package/luci/fftemplate)
384 TITLE:=Freifunk DHCP-Splash application
387 define Package/luci-app-splash/conffiles
388 /etc/config/luci_splash
391 define Package/luci-app-splash/install
392 $(call Package/luci/install/template,$(1),applications/luci-splash)
396 define Package/luci-app-statistics
397 $(call Package/luci/webtemplate)
398 DEPENDS+=+luci-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
399 TITLE:=LuCI Statistics Application
402 define Package/luci-app-statistics/conffiles
403 /etc/config/luci_statistics
406 define Package/luci-app-statistics/install
407 $(call Package/luci/install/template,$(1),applications/luci-statistics)
411 define Package/luci-app-upnp
412 $(call Package/luci/webtemplate)
413 DEPENDS+=+luci-admin-core +miniupnpd
414 TITLE:=Universal Plug & Play configuration module
417 define Package/luci-app-upnp/install
418 $(call Package/luci/install/template,$(1),applications/luci-upnp)
422 define Package/luci-app-ntpc
423 $(call Package/luci/webtemplate)
424 DEPENDS+=+luci-admin-core +ntpclient
425 TITLE:=NTP time synchronisation client configuration module
428 define Package/luci-app-ntpc/install
429 $(call Package/luci/install/template,$(1),applications/luci-ntpc)
433 define Package/luci-app-ddns
434 $(call Package/luci/webtemplate)
435 DEPENDS+=+luci-admin-core +ddns-scripts
436 TITLE:=Dynamic DNS configuration module
439 define Package/luci-app-ddns/install
440 $(call Package/luci/install/template,$(1),applications/luci-ddns)
444 define Package/luci-app-samba
445 $(call Package/luci/webtemplate)
446 DEPENDS+=+luci-admin-full +samba3
447 TITLE:=Network Shares - Samba SMB/CIFS module
450 define Package/luci-app-samba/install
451 $(call Package/luci/install/template,$(1),applications/luci-samba)
455 define Package/luci-app-uvc_streamer
456 $(call Package/luci/webtemplate)
457 DEPENDS+=+luci-admin-full +uvc-streamer
458 TITLE:=Webcam Streaming - UVC-Streamer module
461 define Package/luci-app-uvc_streamer/install
462 $(call Package/luci/install/template,$(1),applications/luci-uvc_streamer)
466 define Package/luci-app-p910nd
467 $(call Package/luci/webtemplate)
468 DEPENDS+=+luci-admin-full +p910nd
469 TITLE:=p910nd - Printer server module
472 define Package/luci-app-p910nd/install
473 $(call Package/luci/install/template,$(1),applications/luci-p910nd)
477 define Package/luci-app-ushare
478 $(call Package/luci/webtemplate)
479 DEPENDS+=+luci-admin-full +ushare
480 TITLE:=ushare - UPnP A/V & DLNA Media Server
483 define Package/luci-app-ushare/install
484 $(call Package/luci/install/template,$(1),applications/luci-ushare)
488 ### Server Gateway Interfaces ###
490 define Package/luci-sgi-cgi
491 $(call Package/luci/libtemplate)
495 define Package/luci-sgi-cgi/install
496 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
499 define Package/luci-sgi-luci
500 $(call Package/luci/libtemplate)
502 TITLE:=SGI for LuCI HTTPD
505 define Package/luci-sgi-luci/install
506 $(call Package/luci/install/template,$(1),libs/sgi-luci)
509 define Package/luci-sgi-webuci
510 $(call Package/luci/libtemplate)
511 TITLE:=SGI for Webuci
514 define Package/luci-sgi-webuci/install
515 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
519 define Package/luci-theme-fledermaus
520 $(call Package/luci/fftemplate)
522 TITLE:=Fledermaus Theme
525 define Package/luci-theme-fledermaus/install
526 $(call Package/luci/install/template,$(1),themes/fledermaus)
529 define Package/luci-theme-openwrt
530 $(call Package/luci/thtemplate)
531 TITLE:=OpenWRT.org (default)
534 define Package/luci-theme-openwrt/install
535 $(call Package/luci/install/template,$(1),themes/openwrt.org)
538 define Package/luci-theme-openwrtlight
539 $(call Package/luci/thtemplate)
540 TITLE:=OpenWRT.org - light variant without images
543 define Package/luci-theme-openwrtlight/install
544 $(call Package/luci/install/template,$(1),themes/openwrt-light)
549 define Package/luci-i18n-german
550 $(call Package/luci/i18ntemplate)
554 define Package/luci-i18n-german/install
555 $(call Package/luci/install/template,$(1),i18n/german)
559 define Package/luci-i18n-english
560 $(call Package/luci/i18ntemplate)
564 define Package/luci-i18n-english/install
565 $(call Package/luci/install/template,$(1),i18n/english)
569 define Package/luci-i18n-french
570 $(call Package/luci/i18ntemplate)
571 TITLE:=French (by Florian Fainelli)
574 define Package/luci-i18n-french/install
575 $(call Package/luci/install/template,$(1),i18n/french)
579 define Package/luci-i18n-russian
580 $(call Package/luci/i18ntemplate)
581 TITLE:=Russian (by Skryabin Dmitry)
584 define Package/luci-i18n-russian/install
585 $(call Package/luci/install/template,$(1),i18n/russian)
589 define Package/luci-i18n-portuguese_brazilian
590 $(call Package/luci/i18ntemplate)
591 TITLE:=Portuguese (Brazilian) (by Carlos Cesario)
594 define Package/luci-i18n-portuguese_brazilian/install
595 $(call Package/luci/install/template,$(1),i18n/portuguese_brazilian)
600 ifneq ($(CONFIG_PACKAGE_luci-core),)
601 PKG_SELECTED_MODULES+=libs/core
603 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
604 PKG_SELECTED_MODULES+=libs/cbi
606 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
607 PKG_SELECTED_MODULES+=libs/fastindex
609 ifneq ($(CONFIG_PACKAGE_luci-http),)
610 PKG_SELECTED_MODULES+=libs/http
612 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
613 PKG_SELECTED_MODULES+=libs/ipkg
615 ifneq ($(CONFIG_PACKAGE_luci-json),)
616 PKG_SELECTED_MODULES+=libs/json
618 ifneq ($(CONFIG_PACKAGE_luci-uci),)
619 PKG_SELECTED_MODULES+=libs/uci
621 ifneq ($(CONFIG_PACKAGE_luci-sys),)
622 PKG_SELECTED_MODULES+=libs/sys
624 ifneq ($(CONFIG_PACKAGE_luci-web),)
625 PKG_SELECTED_MODULES+=libs/web
627 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
628 PKG_SELECTED_MODULES+=libs/uvl
631 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
632 PKG_SELECTED_MODULES+=libs/httpd
635 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
636 PKG_SELECTED_MODULES+=modules/admin-core
638 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
639 PKG_SELECTED_MODULES+=modules/admin-mini
641 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
642 PKG_SELECTED_MODULES+=modules/admin-full
644 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
645 PKG_SELECTED_MODULES+=modules/rpc
647 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
648 PKG_SELECTED_MODULES+=modules/freifunk
651 ifneq ($(CONFIG_PACKAGE_luci-freifunk-community),)
652 PKG_SELECTED_MODULES+=applications/freifunk-community
655 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
656 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
658 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
659 PKG_SELECTED_MODULES+=applications/luci-fw
661 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
662 PKG_SELECTED_MODULES+=applications/luci-olsr
664 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
665 PKG_SELECTED_MODULES+=applications/luci-qos
667 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
668 PKG_SELECTED_MODULES+=applications/luci-splash
670 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
671 PKG_SELECTED_MODULES+=applications/luci-statistics
673 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
674 PKG_SELECTED_MODULES+=applications/luci-upnp
676 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
677 PKG_SELECTED_MODULES+=applications/luci-ntpc
679 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
680 PKG_SELECTED_MODULES+=applications/luci-ddns
682 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
683 PKG_SELECTED_MODULES+=applications/luci-samba
685 ifneq ($(CONFIG_PACKAGE_luci-app-uvc_streamer),)
686 PKG_SELECTED_MODULES+=applications/luci-uvc_streamer
688 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
689 PKG_SELECTED_MODULES+=applications/luci-p910nd
691 ifneq ($(CONFIG_PACKAGE_luci-app-ushare),)
692 PKG_SELECTED_MODULES+=applications/luci-ushare
696 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
697 PKG_SELECTED_MODULES+=libs/sgi-cgi
699 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
700 PKG_SELECTED_MODULES+=libs/sgi-luci
702 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
703 PKG_SELECTED_MODULES+=libs/sgi-webuci
706 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
707 PKG_SELECTED_MODULES+=themes/fledermaus
709 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
710 PKG_SELECTED_MODULES+=themes/openwrt.org
712 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
713 PKG_SELECTED_MODULES+=themes/openwrt-light
716 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
717 PKG_SELECTED_MODULES+=i18n/german
719 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
720 PKG_SELECTED_MODULES+=i18n/english
722 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
723 PKG_SELECTED_MODULES+=i18n/french
725 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
726 PKG_SELECTED_MODULES+=i18n/russian
728 ifneq ($(CONFIG_PACKAGE_luci-i18n-portuguese_brazilian),)
729 PKG_SELECTED_MODULES+=i18n/portuguese_brazilian
734 MODULES="$(PKG_SELECTED_MODULES)" \
735 LUA_TARGET="$(LUA_TARGET)" \
736 LUA_SHLIBS="-llua -lm" \
737 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
738 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
742 $(eval $(call BuildPackage,luci-core))
743 $(eval $(call BuildPackage,luci-cbi))
744 $(eval $(call BuildPackage,luci-fastindex))
745 $(eval $(call BuildPackage,luci-http))
746 $(eval $(call BuildPackage,luci-ipkg))
747 $(eval $(call BuildPackage,luci-json))
748 $(eval $(call BuildPackage,luci-uci))
749 $(eval $(call BuildPackage,luci-sys))
750 $(eval $(call BuildPackage,luci-web))
751 $(eval $(call BuildPackage,luci-uvl))
753 $(eval $(call BuildPackage,luci-httpd))
755 $(eval $(call BuildPackage,luci-admin-core))
756 $(eval $(call BuildPackage,luci-admin-mini))
757 $(eval $(call BuildPackage,luci-admin-full))
758 $(eval $(call BuildPackage,luci-admin-rpc))
759 $(eval $(call BuildPackage,luci-mod-freifunk))
761 $(eval $(call BuildPackage,luci-freifunk-community))
763 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
764 $(eval $(call BuildPackage,luci-app-firewall))
765 $(eval $(call BuildPackage,luci-app-olsr))
766 $(eval $(call BuildPackage,luci-app-qos))
767 $(eval $(call BuildPackage,luci-app-splash))
768 $(eval $(call BuildPackage,luci-app-statistics))
769 $(eval $(call BuildPackage,luci-app-upnp))
770 $(eval $(call BuildPackage,luci-app-ntpc))
771 $(eval $(call BuildPackage,luci-app-ddns))
772 $(eval $(call BuildPackage,luci-app-samba))
773 $(eval $(call BuildPackage,luci-app-uvc_streamer))
774 $(eval $(call BuildPackage,luci-app-p910nd))
775 $(eval $(call BuildPackage,luci-app-ushare))
777 $(eval $(call BuildPackage,luci-sgi-cgi))
778 $(eval $(call BuildPackage,luci-sgi-luci))
779 $(eval $(call BuildPackage,luci-sgi-webuci))
781 $(eval $(call BuildPackage,luci-theme-fledermaus))
782 $(eval $(call BuildPackage,luci-theme-openwrt))
783 $(eval $(call BuildPackage,luci-theme-openwrtlight))
785 $(eval $(call BuildPackage,luci-i18n-german))
786 $(eval $(call BuildPackage,luci-i18n-english))
787 $(eval $(call BuildPackage,luci-i18n-french))
788 $(eval $(call BuildPackage,luci-i18n-russian))
789 $(eval $(call BuildPackage,luci-i18n-portuguese_brazilian))