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.7+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 (PARTLY BROKEN)
65 DEPENDS:=+luci-mod-freifunk @BROKEN
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)
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-sys
191 $(call Package/luci/libtemplate)
192 TITLE:=LuCI Linux/POSIX system library
195 define Package/luci-sys/install
196 $(call Package/luci/install/template,$(1),libs/sys)
200 define Package/luci-web
201 $(call Package/luci/libtemplate)
202 DEPENDS+=+luci-http +luci-sys +luci-addons +luci-uci +luci-sgi-cgi
203 TITLE:=MVC Webframework
206 define Package/luci-web/conffiles
210 define Package/luci-web/install
211 $(call Package/luci/install/template,$(1),libs/web)
215 define Package/luci-uvl
216 $(call Package/luci/libtemplate)
217 DEPENDS+=+luci-sys +luci-uci +luci-core
218 TITLE:=UVL - UCI Validation Layer
221 define Package/luci-uvl/install
222 $(call Package/luci/install/template,$(1),libs/uvl)
229 define Package/luci-httpd
230 $(call Package/luci/httpdtemplate)
231 DEPENDS:=+luci-http +luasocket
235 define Package/luci-httpd/install
236 $(call Package/luci/install/template,$(1),libs/httpd)
241 ### Community Packages ###
243 define Package/luci-ff-halle
244 $(call Package/luci/fftemplate)
246 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
247 +luci-app-ffwizard-leipzig \
248 +luci-theme-fledermaus \
250 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
252 TITLE:=Freifunk Halle Community Meta-Package
255 define Package/luci-ff-halle/install
256 $(call Package/luci/install/template,$(1),applications/community-halle)
260 define Package/luci-ff-leipzig
261 $(call Package/luci/fftemplate)
263 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
264 +luci-app-ffwizard-leipzig \
265 +luci-theme-fledermaus \
267 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
269 TITLE:=Freifunk Leipzig Community Meta-Package
272 define Package/luci-ff-leipzig/install
273 $(call Package/luci/install/template,$(1),applications/community-leipzig)
277 define Package/luci-ff-hannover
278 $(call Package/luci/fftemplate)
280 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
281 +luci-theme-fledermaus \
283 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
284 TITLE:=Freifunk Hannover Community Meta-Package
285 URL:=http://www.freifunk-hannover.de/
286 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
289 define Package/luci-ff-hannover/install
290 $(call Package/luci/install/template,$(1),applications/community-hannover)
294 define Package/luci-ff-berlin
295 $(call Package/luci/fftemplate)
297 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
298 +luci-theme-fledermaus \
300 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
301 TITLE:=Freifunk Berlin Community Meta-Package
304 define Package/luci-ff-berlin/install
305 $(call Package/luci/install/template,$(1),applications/community-berlin)
308 define Package/luci-ff-augsburg
309 $(call Package/luci/fftemplate)
311 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
312 +luci-theme-fledermaus \
314 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
315 TITLE:=Freifunk Augsburg Community Meta-Package
318 define Package/luci-ff-augsburg/install
319 $(call Package/luci/install/template,$(1),applications/community-augsburg)
324 define Package/luci-admin-core
325 $(call Package/luci/webtemplate)
326 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
327 TITLE:=Web UI Core Module
330 define Package/luci-admin-core/install
331 $(call Package/luci/install/template,$(1),modules/admin-core)
335 define Package/luci-admin-mini
336 $(call Package/luci/webtemplate)
337 DEPENDS+=+luci-admin-core
338 TITLE:=LuCI Essentials - casual user's interface
341 define Package/luci-admin-mini/install
342 $(call Package/luci/install/template,$(1),modules/admin-mini)
346 define Package/luci-admin-full
347 $(call Package/luci/webtemplate)
348 DEPENDS+=+luci-admin-core +luci-ipkg
349 TITLE:=LuCI Administration - power user's interface
352 define Package/luci-admin-full/install
353 $(call Package/luci/install/template,$(1),modules/admin-full)
357 define Package/luci-mod-freifunk
358 $(call Package/luci/fftemplate)
359 DEPENDS:=+luci-admin-full
360 TITLE:=LuCI Freifunk module
363 define Package/luci-mod-freifunk/conffiles
367 define Package/luci-mod-freifunk/install
368 $(call Package/luci/install/template,$(1),modules/freifunk)
375 define Package/luci-app-ffwizard-leipzig
376 $(call Package/luci/fftemplate)
377 TITLE:=Freifunk Leipzig configuration wizard
380 define Package/luci-app-ffwizard-leipzig/install
381 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
385 define Package/luci-app-firewall
386 $(call Package/luci/webtemplate)
387 DEPENDS+=+luci-admin-core +firewall
388 TITLE:=Firewall and Portforwarding application
391 define Package/luci-app-firewall/install
392 $(call Package/luci/install/template,$(1),applications/luci-fw)
396 define Package/luci-app-olsr
397 $(call Package/luci/webtemplate)
398 DEPENDS+=+luci-admin-full +olsrd +olsrd-mod-txtinfo
399 TITLE:=OLSR configuration and status module
402 define Package/luci-app-olsr/install
403 $(call Package/luci/install/template,$(1),applications/luci-olsr)
407 define Package/luci-app-qos
408 $(call Package/luci/webtemplate)
409 DEPENDS+=+luci-admin-core +qos-scripts
410 TITLE:=Quality of Service configuration module
413 define Package/luci-app-qos/install
414 $(call Package/luci/install/template,$(1),applications/luci-qos)
418 define Package/luci-app-splash
419 $(call Package/luci/fftemplate)
420 DEPENDS+=+luasocket +luci-app-firewall
421 TITLE:=Freifunk DHCP-Splash application
424 define Package/luci-app-splash/conffiles
425 /etc/config/luci_splash
428 define Package/luci-app-splash/install
429 $(call Package/luci/install/template,$(1),applications/luci-splash)
433 define Package/luci-app-statistics
434 $(call Package/luci/webtemplate)
435 DEPENDS+=+luci-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
436 TITLE:=LuCI Statistics Application
439 define Package/luci-app-statistics/conffiles
440 /etc/config/luci_statistics
443 define Package/luci-app-statistics/install
444 $(call Package/luci/install/template,$(1),applications/luci-statistics)
448 define Package/luci-app-upnp
449 $(call Package/luci/webtemplate)
450 DEPENDS+=+luci-admin-core +miniupnpd
451 TITLE:=Universal Plug & Play configuration module
454 define Package/luci-app-upnp/install
455 $(call Package/luci/install/template,$(1),applications/luci-upnp)
459 define Package/luci-app-ntpc
460 $(call Package/luci/webtemplate)
461 DEPENDS+=+luci-admin-core +ntpclient
462 TITLE:=NTP time synchronisation client configuration module
465 define Package/luci-app-ntpc/install
466 $(call Package/luci/install/template,$(1),applications/luci-ntpc)
470 define Package/luci-app-ddns
471 $(call Package/luci/webtemplate)
472 DEPENDS+=+luci-admin-core +ddns-scripts
473 TITLE:=Dynamic DNS configuration module
476 define Package/luci-app-ddns/install
477 $(call Package/luci/install/template,$(1),applications/luci-ddns)
481 define Package/luci-app-samba
482 $(call Package/luci/webtemplate)
483 DEPENDS+=+luci-admin-full +samba3
484 TITLE:=Network Shares - Samba SMB/CIFS module
487 define Package/luci-app-samba/install
488 $(call Package/luci/install/template,$(1),applications/luci-samba)
492 ### Server Gateway Interfaces ###
494 define Package/luci-sgi-cgi
495 $(call Package/luci/libtemplate)
499 define Package/luci-sgi-cgi/install
500 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
503 define Package/luci-sgi-luci
504 $(call Package/luci/libtemplate)
506 TITLE:=SGI for LuCI HTTPD
509 define Package/luci-sgi-luci/install
510 $(call Package/luci/install/template,$(1),libs/sgi-luci)
513 define Package/luci-sgi-webuci
514 $(call Package/luci/libtemplate)
515 TITLE:=SGI for Webuci
518 define Package/luci-sgi-webuci/install
519 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
523 define Package/luci-theme-fledermaus
524 $(call Package/luci/fftemplate)
526 TITLE:=Fledermaus Theme
529 define Package/luci-theme-fledermaus/install
530 $(call Package/luci/install/template,$(1),themes/fledermaus)
533 define Package/luci-theme-openwrt
534 $(call Package/luci/thtemplate)
535 TITLE:=OpenWRT.org (default)
538 define Package/luci-theme-openwrt/install
539 $(call Package/luci/install/template,$(1),themes/openwrt.org)
542 define Package/luci-theme-openwrtlight
543 $(call Package/luci/thtemplate)
544 TITLE:=OpenWRT.org - light variant without images
547 define Package/luci-theme-openwrtlight/install
548 $(call Package/luci/install/template,$(1),themes/openwrt-light)
553 define Package/luci-i18n-german
554 $(call Package/luci/i18ntemplate)
558 define Package/luci-i18n-german/install
559 $(call Package/luci/install/template,$(1),i18n/german)
563 define Package/luci-i18n-english
564 $(call Package/luci/i18ntemplate)
568 define Package/luci-i18n-english/install
569 $(call Package/luci/install/template,$(1),i18n/english)
573 define Package/luci-i18n-french
574 $(call Package/luci/i18ntemplate)
575 TITLE:=French (by Florian Fainelli)
578 define Package/luci-i18n-french/install
579 $(call Package/luci/install/template,$(1),i18n/french)
583 define Package/luci-i18n-russian
584 $(call Package/luci/i18ntemplate)
585 TITLE:=Russian (by Skryabin Dmitry)
588 define Package/luci-i18n-russian/install
589 $(call Package/luci/install/template,$(1),i18n/russian)
595 ifneq ($(CONFIG_PACKAGE_luci-core),)
596 PKG_SELECTED_MODULES+=libs/core
598 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
599 PKG_SELECTED_MODULES+=libs/cbi
601 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
602 PKG_SELECTED_MODULES+=libs/fastindex
604 ifneq ($(CONFIG_PACKAGE_luci-http),)
605 PKG_SELECTED_MODULES+=libs/http
607 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
608 PKG_SELECTED_MODULES+=libs/ipkg
610 ifneq ($(CONFIG_PACKAGE_luci-uci),)
611 PKG_SELECTED_MODULES+=libs/uci
613 ifneq ($(CONFIG_PACKAGE_luci-sys),)
614 PKG_SELECTED_MODULES+=libs/sys
616 ifneq ($(CONFIG_PACKAGE_luci-web),)
617 PKG_SELECTED_MODULES+=libs/web
619 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
620 PKG_SELECTED_MODULES+=libs/uvl
623 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
624 PKG_SELECTED_MODULES+=libs/httpd
627 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
628 PKG_SELECTED_MODULES+=applications/community-halle
630 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
631 PKG_SELECTED_MODULES+=applications/community-leipzig
633 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
634 PKG_SELECTED_MODULES+=applications/community-hannover
636 ifneq ($(CONFIG_PACKAGE_luci-ff-berlin),)
637 PKG_SELECTED_MODULES+=applications/community-berlin
639 ifneq ($(CONFIG_PACKAGE_luci-ff-augsburg),)
640 PKG_SELECTED_MODULES+=applications/community-augsburg
643 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
644 PKG_SELECTED_MODULES+=modules/admin-core
646 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
647 PKG_SELECTED_MODULES+=modules/admin-mini
649 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
650 PKG_SELECTED_MODULES+=modules/admin-full
652 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
653 PKG_SELECTED_MODULES+=modules/freifunk
656 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
657 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
659 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
660 PKG_SELECTED_MODULES+=applications/luci-fw
662 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
663 PKG_SELECTED_MODULES+=applications/luci-olsr
665 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
666 PKG_SELECTED_MODULES+=applications/luci-qos
668 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
669 PKG_SELECTED_MODULES+=applications/luci-splash
671 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
672 PKG_SELECTED_MODULES+=applications/luci-statistics
674 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
675 PKG_SELECTED_MODULES+=applications/luci-upnp
677 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
678 PKG_SELECTED_MODULES+=applications/luci-ntpc
680 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
681 PKG_SELECTED_MODULES+=applications/luci-ddns
683 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
684 PKG_SELECTED_MODULES+=applications/luci-samba
688 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
689 PKG_SELECTED_MODULES+=libs/sgi-cgi
691 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
692 PKG_SELECTED_MODULES+=libs/sgi-luci
694 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
695 PKG_SELECTED_MODULES+=libs/sgi-webuci
698 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
699 PKG_SELECTED_MODULES+=themes/fledermaus
701 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
702 PKG_SELECTED_MODULES+=themes/openwrt.org
704 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
705 PKG_SELECTED_MODULES+=themes/openwrt-light
708 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
709 PKG_SELECTED_MODULES+=i18n/german
711 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
712 PKG_SELECTED_MODULES+=i18n/english
714 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
715 PKG_SELECTED_MODULES+=i18n/french
717 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
718 PKG_SELECTED_MODULES+=i18n/russian
723 MODULES="$(PKG_SELECTED_MODULES)" \
724 LUA_TARGET="$(LUA_TARGET)" \
725 LUA_SHLIBS="-llua -lm" \
726 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
727 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
731 $(eval $(call BuildPackage,luci-core))
732 $(eval $(call BuildPackage,luci-cbi))
733 $(eval $(call BuildPackage,luci-fastindex))
734 $(eval $(call BuildPackage,luci-http))
735 $(eval $(call BuildPackage,luci-ipkg))
736 $(eval $(call BuildPackage,luci-uci))
737 $(eval $(call BuildPackage,luci-sys))
738 $(eval $(call BuildPackage,luci-web))
739 $(eval $(call BuildPackage,luci-uvl))
741 $(eval $(call BuildPackage,luci-httpd))
743 $(eval $(call BuildPackage,luci-ff-halle))
744 $(eval $(call BuildPackage,luci-ff-leipzig))
745 $(eval $(call BuildPackage,luci-ff-hannover))
746 $(eval $(call BuildPackage,luci-ff-berlin))
747 $(eval $(call BuildPackage,luci-ff-augsburg))
749 $(eval $(call BuildPackage,luci-admin-core))
750 $(eval $(call BuildPackage,luci-admin-mini))
751 $(eval $(call BuildPackage,luci-admin-full))
752 $(eval $(call BuildPackage,luci-mod-freifunk))
754 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
755 $(eval $(call BuildPackage,luci-app-firewall))
756 $(eval $(call BuildPackage,luci-app-olsr))
757 $(eval $(call BuildPackage,luci-app-qos))
758 $(eval $(call BuildPackage,luci-app-splash))
759 $(eval $(call BuildPackage,luci-app-statistics))
760 $(eval $(call BuildPackage,luci-app-upnp))
761 $(eval $(call BuildPackage,luci-app-ntpc))
762 $(eval $(call BuildPackage,luci-app-ddns))
763 $(eval $(call BuildPackage,luci-app-samba))
765 $(eval $(call BuildPackage,luci-sgi-cgi))
766 $(eval $(call BuildPackage,luci-sgi-luci))
767 $(eval $(call BuildPackage,luci-sgi-webuci))
769 $(eval $(call BuildPackage,luci-theme-fledermaus))
770 $(eval $(call BuildPackage,luci-theme-openwrt))
771 $(eval $(call BuildPackage,luci-theme-openwrtlight))
773 $(eval $(call BuildPackage,luci-i18n-german))
774 $(eval $(call BuildPackage,luci-i18n-english))
775 $(eval $(call BuildPackage,luci-i18n-french))
776 $(eval $(call BuildPackage,luci-i18n-russian))